alephdata / servicelayer

Common interface definitions for aleph toolkit services and applications
MIT License
7 stars 5 forks source link

Make worker threads retry fetching a valid task before quitting #61

Closed sunu closed 2 years ago

sunu commented 2 years ago

Sometime it takes some time for the initial task to spawn child tasks. (eg: when the initial task has to download a file first). In that case, other worker threads should not quit because they couldn't find a task to work on.

When running in non-blocking mode, a worker thread will retry to get a task a bunch of time. It will exit only after a retry limit is reached.

Fixes #58