From 8fb4886b7a693423308ec8aaacc709cf3bace312 Mon Sep 17 00:00:00 2001 From: Jimmy Royer Date: Thu, 9 Nov 2023 19:10:34 -0500 Subject: [PATCH] Removed types; moved some more info log into debug --- app/celery/celery.py | 6 +++--- app/celery/tasks.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/celery/celery.py b/app/celery/celery.py index ceadbe8256..21e78e7949 100644 --- a/app/celery/celery.py +++ b/app/celery/celery.py @@ -19,8 +19,8 @@ class NotifyTask(Task): start = None def on_success(self, retval, task_id, args, kwargs): - task_name: str = self.name - now: float = time.time() + task_name = self.name + now = time.time() statsd_client.timing_with_dates(f"celery-task.{task_name}.total-time", now, self.start) elapsed_time = now - self.start @@ -34,7 +34,7 @@ def on_failure(self, exc, task_id, args, kwargs, einfo): def __call__(self, *args, **kwargs): # ensure task has flask context to access config, logger, etc with app.app_context(): - self.start: float = time.time() + self.start = time.time() return super().__call__(*args, **kwargs) return NotifyTask diff --git a/app/celery/tasks.py b/app/celery/tasks.py index a8cef380eb..32aa687fcc 100644 --- a/app/celery/tasks.py +++ b/app/celery/tasks.py @@ -277,7 +277,7 @@ def save_smss(self, service_id: Optional[str], signed_notifications: List[Signed try: # If the data is not present in the encrypted data then fallback on whats needed for process_job. saved_notifications = persist_notifications(verified_notifications) - current_app.debug.info( + current_app.debug( f"Saved following notifications into db: {notification_id_queue.keys()} associated with receipt {receipt}" ) if receipt: @@ -383,7 +383,7 @@ def save_emails(self, _service_id: Optional[str], signed_notifications: List[Sig try: # If the data is not present in the encrypted data then fallback on whats needed for process_job saved_notifications = persist_notifications(verified_notifications) - current_app.debug.info( + current_app.debug( f"Saved following notifications into db: {notification_id_queue.keys()} associated with receipt {receipt}" ) if receipt: