Skip to content

Commit

Permalink
Removed types; moved some more info log into debug
Browse files Browse the repository at this point in the history
  • Loading branch information
jimleroyer committed Nov 10, 2023
1 parent f60e84f commit 8fb4886
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions app/celery/celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions app/celery/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 8fb4886

Please sign in to comment.