Skip to content
Snippets Groups Projects
Commit b15a17d8 authored by Phil Höfer's avatar Phil Höfer
Browse files

Modify Startup

parent 675555bd
No related branches found
No related tags found
No related merge requests found
Pipeline #10077 passed
......@@ -62,6 +62,7 @@ spec:
httpGet:
path: /healthz
port: http
timeoutSeconds: 20
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
......
......@@ -143,7 +143,7 @@ fn process_request(request: tiny_http::Request, config: HashMap<String, String>,
request.respond(response);
let now = std::time::SystemTime::now();
let elapsed = now.duration_since(last_update).expect("Time went backwards");
if elapsed >= std::time::Duration::from_secs(2 * 60 * 60) { //every 2h
if elapsed >= std::time::Duration::from_secs(12 * 60 * 60) { //every 12h
markov_chain.decay();
read_from_db(config.clone(), markov_chain);
last_update = now;
......@@ -180,7 +180,7 @@ fn read_from_db(config: HashMap<String, String>, predictor: &mut CompositePredic
match client {
Ok(mut c) => {
let mut count = 0;
match c.query("SELECT query FROM public.logs_partitioned ORDER BY time DESC LIMIT 1000", &[]) {
match c.query("SELECT query FROM public.logs_partitioned ORDER BY time DESC LIMIT 10000", &[]) {
Ok(rows) => {
for row in rows {
let query: &str = row.get(0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment