openzim / zimfarm

Farm operated by bots to grow and harvest new zim files
https://farm.openzim.org
GNU General Public License v3.0
81 stars 25 forks source link

Add ability to pause worker scheduling #1022

Open benoit74 opened 19 hours ago

benoit74 commented 19 hours ago

Currently when one want the manager to stop starting new task, it is needed to completely stop the container.

This has many drawbacks:

I think it would help to create a new status for the worker : cordon (to reuse k8s term) or scheduling_disabled

In this status the worker would just stop starting new tasks but will continue all the rest of its duties.

This should probably be configured in /etc/zimfarm.config (needing a manager restart, but this is not a problem)

This status should be reported during check-in, stored in DB, displayed in UI.

rgaudin commented 18 hours ago

Can be done by toggling the OFFLINERS conf to empty in that same file in the mean time ; or by setting SELFISH (not exactly equivalent but would work for most cases)