Skip to content

Commit

Permalink
refactoring: update Task response data structure (#439)
Browse files Browse the repository at this point in the history
* enforce message and error in case of status False, issue 351

* refactoring _task_result function to address the improvements of task 351

* removing status argument from _task_result to better check error validation

* In discussion with @kairoaraujo, we identified an opportunity to
enhance the consistency of Task Results in our codebase.

Previously, the Celery Task result for `FAILURE` was structured as a
dictionary with keys `task_id`, `state` and `result`. The `result`
field was defined as either a `str` or `Dict[str, any]`, causing
inconsistency.

This commit introduces these changes to ensure a consistent data
structure and aligns with the specified API documentation.

For more details, refer to the discussions in this pull request
/pull/439
  • Loading branch information
fsavoia authored Jan 30, 2024
1 parent ffd264d commit e6adaf0
Show file tree
Hide file tree
Showing 3 changed files with 295 additions and 278 deletions.
8 changes: 8 additions & 0 deletions docs/source/devel/repository_service_tuf_worker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ repository\_service\_tuf\_worker.repository module
:undoc-members:
:show-inheritance:

repository\_service\_tuf\_worker.signer module
----------------------------------------------

.. automodule:: repository_service_tuf_worker.signer
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

Expand Down
Loading

0 comments on commit e6adaf0

Please sign in to comment.