nebula-orchestrator/worker

Add cron jobs management support

naorlivne opened this issue · 1 comments

Expected/Wanted Behavior

Following nebula-orchestrator/manager#29 the worker will need to be changed to allow supporting the new cron_jobs option, this will need a few changes:

  • Reading the device_group /info page will need to also read and manage the local cron_jobs configuration similarly to how it manages Nebula apps local configuration right now
  • The current sleep logic will need to be changed so that it starts the cron_jobs containers and only moves on to reread the Nebula manager device_group /info after the "nebula_manager_check_in_time" as elapsed rather then sleep the entire "nebula_manager_check_in_time" in one go

(Thinking using https://pypi.org/project/croniter/ for the cron parsing to datetime and from there the logic is very simple)

Actual Behavior

The current workarounds is to either have a cron service managed as a Nebula app that will in turn start containers based on it's cron definitions or have all tasks that need to run based on a schedule each be it's on Nebula app and to have an internal logic in them that waits for the right time to run.

added in 2.5.0