From 096e3a367deb19d49aac78a61beb47eb77187263 Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Thu, 26 Sep 2024 15:17:57 -0700 Subject: [PATCH] clean up --- app/aws/s3.py | 6 ------ app/config.py | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/app/aws/s3.py b/app/aws/s3.py index 9d82a1cb8..02e12db60 100644 --- a/app/aws/s3.py +++ b/app/aws/s3.py @@ -36,7 +36,6 @@ def clean_cache(): keys_to_delete.append(key) for key in keys_to_delete: - print(hilite(f"DELETING {key}")) del job_cache[key] @@ -349,13 +348,10 @@ def extract_personalisation(job): def get_phone_number_from_s3(service_id, job_id, job_row_number): - print("ENTER get_phone_number_from_s3") job = job_cache.get(job_id) - print(f"JOB FROM CACHE {job}") if job is None: current_app.logger.info(f"job {job_id} was not in the cache") job = get_job_from_s3(service_id, job_id) - print(f"JOB from s3 {job}") # Even if it is None, put it here to avoid KeyErrors set_job_cache(job_cache, job_id, job) else: @@ -372,11 +368,9 @@ def get_phone_number_from_s3(service_id, job_id, job_row_number): # and that dictionary is not there, create it if job_cache.get(f"{job_id}_phones") is None: phones = extract_phones(job) - print(f"HMMM job is {job} phones are {phones}") set_job_cache(job_cache, f"{job_id}_phones", phones) # If we can find the quick dictionary, use it - print(f"PHONES {phones} ROW NUMBER {job_row_number}") phone_to_return = phones[job_row_number] if phone_to_return: return phone_to_return diff --git a/app/config.py b/app/config.py index a46d5a6c2..4a8c880d3 100644 --- a/app/config.py +++ b/app/config.py @@ -271,7 +271,7 @@ class Config(object): }, "clean-job-cache": { "task": "clean-job-cache", - "schedule": crontab(minute="*/5"), + "schedule": crontab(hour=2, minute=11), "options": {"queue": QueueNames.PERIODIC}, }, "cleanup-unfinished-jobs": {