Refactor ProgressRecorder for non-optional Celery usage and add doc strings #2139

Merged
hansegucker merged 8 commits from fix/progress into 359-make-celery-non-optional 2021-02-16 19:33:19 +01:00
Owner

Close #377

Close #377
Author
Owner

@debdolph I added your branch for !2136 as target, so you can merge this into yours after @nik did a review.

@debdolph I added your branch for !2136 as target, so you can merge this into yours after @nik did a review.
Owner

Is this an API from the base progress recorder, or a new method invented by you?

Is this an API from the base progress recorder, or a new method invented by you?
Author
Owner

If I remember correctly, this is a new method.

If I remember correctly, this is a new method.
Owner

Hiding this decorator in the recorder class is a bit inobvious. The method should not do two things, decorating a function to be automatically delayd on call and tracking its progress should be separated.

Hiding this decorator in the recorder class is a bit inobvious. The method should not do two things, decorating a function to be automatically `delay`d on call and tracking its progress should be separated.
Owner

Please find out. If it overrides an existing method, you should take care not to shadow its docstring.

Please find out. If it overrides an existing method, you should take care not to shadow its docstring.
Author
Owner

It's definitely new.

It's definitely new.
Owner

k

k
Owner
Please use `functools.wraps`. https://docs.python.org/3/library/functools.html#functools.wraps
Owner

I figure you have a dice with a float on each side?

I figure you have a dice with a float on each side?
Owner

changed this line in version 2 of the diff

changed this line in [version 2 of the diff](/AlekSIS/official/AlekSIS-Core/-/merge_requests/494/diffs?diff_id=4834&start_sha=c9345e83b2aa546b1541a8ce2bd5898a79971219#62ff94f713598e770fb7bc6f7ab3cbacbbc4a643_110_146)
Owner

changed this line in version 2 of the diff

changed this line in [version 2 of the diff](/AlekSIS/official/AlekSIS-Core/-/merge_requests/494/diffs?diff_id=4834&start_sha=c9345e83b2aa546b1541a8ce2bd5898a79971219#62ff94f713598e770fb7bc6f7ab3cbacbbc4a643_125_150)
Owner

changed this line in version 2 of the diff

changed this line in [version 2 of the diff](/AlekSIS/official/AlekSIS-Core/-/merge_requests/494/diffs?diff_id=4834&start_sha=c9345e83b2aa546b1541a8ce2bd5898a79971219#62ff94f713598e770fb7bc6f7ab3cbacbbc4a643_118_146)
Owner

added 7 commits

  • 0bdf5664 - Remove questionnable workaround for timing issue
  • c81581cc - Simplify and rename task recording decorator
  • a8400ce4 - Update documenttion on ProgressRecorder
  • 0d35f974 - Factor recorded_task out of class for brevity
  • f2e29d79 - Rework progress API to be more coherent with upstream and DRY
  • aa176305 - Add iterator interface to record progress from an iterable
  • 924b33a7 - Remove unused import

Compare with previous version

added 7 commits <ul><li>0bdf5664 - Remove questionnable workaround for timing issue</li><li>c81581cc - Simplify and rename task recording decorator</li><li>a8400ce4 - Update documenttion on ProgressRecorder</li><li>0d35f974 - Factor recorded_task out of class for brevity</li><li>f2e29d79 - Rework progress API to be more coherent with upstream and DRY</li><li>aa176305 - Add iterator interface to record progress from an iterable</li><li>924b33a7 - Remove unused import</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-Core/-/merge_requests/494/diffs?diff_id=4834&start_sha=c9345e83b2aa546b1541a8ce2bd5898a79971219)
Owner

resolved all threads

resolved all threads
Owner

mentioned in commit d7b52b1bc8

mentioned in commit d7b52b1bc84843c0090a43196be76507ad79c4ba
nik merged commit d7b52b1bc8 into 359-make-celery-non-optional 2021-02-16 19:33:19 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aleksis/AlekSIS-Core!2139
No description provided.