pyspider
pyspider copied to clipboard
Fix bug: Scheduler paused forever
Environment
pyspider version: 0.3.10
oprate system version: ubuntu
launch command:pyspider -c config.json
I found if my project is paused, I can not recover my project while my project only product many on_cronjob tasks every n seconds.
My case:
Run on_start every 5 seconds.
After my project paused, my project active_tasks was filled by on_cronjob tasks.
My project _paused is "checking" forever.
I have pushed PR. Thank you very much.
to unpause, the project have to have:
- at least UNPAUSE_CHECK_NUM task state respond with in last ACTIVE_TASKS.
- at least 1 process ok
selected tasks without respond is NOT considered as success tasks (as your code changes), which shouldn't unpause the project.