QUADs daemon - Deprecate heavy use of cron
Using the QUADs daemon we could spawn a worker thread on an interval (60 minute?), this thread could check the current schedule.
This worker could check if there are hosts to :
- Move
- Validate
- Post-Deploy
- ETC
Related RFE here in Milestones 1.1 and 2.0 (address same features)
https://github.com/redhat-performance/quads/issues/140 https://github.com/redhat-performance/quads/issues/156
We'll need a proper messagebus / worker architecture here. I've re-purposed #140 and #156 to tackle the more immediate enhancements we need to get there first.
Something like Celery / RabbitMQ may be what we're after long-term to become event-driven and not need to have cron in the mix.
We're looking into celery and in some cases asyncio for this since we're on Python3 now with 1.1. Keeping this open and targeted for 2.0 milestone.
Been doing some research on this and I think celery might be a bit of an overkill as we would require a broker and a backend (Redis for both) for it to run and the scope of celery is more for long running async tasks on a queue which we might not take full advantage of with the Quads workflow.
There are several other tools we can use instead like python3-APScheduler which is available via rpm or the less available schedule or the python standard library sched.