mirror of
https://github.com/bellingcat/auto-archiver-api.git
synced 2026-06-11 13:08:34 +03:00
Create archive task returns dict instead of string
This will save the task result in redis as a json object instead of a json-encoded string. This makes for a nicer response from get_status and prevents the client having to parse a json string to work with the result.
This commit is contained in:
@@ -43,7 +43,7 @@ def create_archive_task(self, archive_json: str):
|
||||
logger.error(e)
|
||||
logger.error(traceback.format_exc())
|
||||
return {"error": e}
|
||||
return result.to_json()
|
||||
return result.to_dict()
|
||||
|
||||
|
||||
@celery.task(name="create_sheet_task", bind=True, autoretry_for=(Exception,), retry_backoff=True, retry_kwargs={'max_retries': 0})
|
||||
|
||||
Reference in New Issue
Block a user