Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
gabino committed Jan 12, 2025
1 parent a9196f9 commit 4a8103c
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions agave/fastapi/tasks/sqs_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,20 @@ async def run_task(
delete_message = True
try:
result = await task_func(body)
parsed_result = json.loads(result) if isinstance(result, str) else result
parsed_result = (
json.loads(result) if isinstance(result, str) else result
)

task_info = {
'task_name': (
task_func.__name__
),
'task_name': (task_func.__name__),
'body': body,
'result': parsed_result,
'sqs': sqs,
'queue_url': queue_url,
'message_receipt_handle': receipt_handle,
'max_retries': max_retries,
}
logger.info(
f"Task Info: {json.dumps(task_info, default=str)}"
)
logger.info(f"Task Info: {json.dumps(task_info, default=str)}")
except RetryTask as retry:
delete_message = message_receive_count >= max_retries + 1
if not delete_message and retry.countdown and retry.countdown > 0:
Expand Down

0 comments on commit 4a8103c

Please sign in to comment.