Datahenge / btu_scheduler_daemon

A Linux daemon that acts as a scheduler and liaison between BTU Task Schedules (with cron expressions), and Python Redis Queue (RQ)
Other
9 stars 6 forks source link

Add TOML config path argument to scheduler daemon #4

Open brian-pond opened 2 years ago

brian-pond commented 2 years ago

Currently, the scheduler daemon always looks for a configuration file at: /etc/btu_scheduler/btu_scheduler.toml. This is fine if you're only running a single instance of BTU (which is typical in a production environment).

However, on development devices, you may have multiple Frappe instances, each with their own BTU. To run multiple BTU Schedulers at the same time, they will need their own UNIX socket, port numbers, SQL credentials, etc.

Add an optional CLI argument to btu_scheduler, providing a path to the configuration file. If given, read and use that. Otherwise, fallback to the current, default location.

brian-pond commented 2 years ago

With the release of v0.3.5, the CLI application has a new, optional argument --config

Usage:

btu --config /foo/bar/btu_scheduler.toml test-ping

Next Up: Do the same, but for the scheduler daemon.