komuw / wiji

Wiji is an asyncio distributed task processor/queue.
MIT License
4 stars 1 forks source link

remove `WijiRetryError` #43

Closed komuw closed 5 years ago

komuw commented 5 years ago

https://github.com/komuw/wiji/blob/e02ee57590c7dc29bf7910861884feb33968247e/wiji/task.py#L30

I think we can replace it with a task.Task._RETRYING boolean.

Using exceptions makes it hard to test code; https://github.com/komuw/wiji/blob/549c7c70e8aa872ce4874a3caeb0a08b6dfc3617/tests/test_task.py#L201-L217

think about all the times in your testcases that you have to try and ignore celery retry errors.
also using exceptions to signal an event seems like an antipattern to me(I know core python uses StopIteration and the like)