We have some jobs that analyze our hosts using facts. These jobs run periodically to feed a database, where we can do some queries about the OS version, packages, etc. At the same time, we have users launching other manual jobs (installation, upgrading, etc.). We have only one AWX instance. Is there any way to give fact jobs a lower priority, so if the user launches manually some job, it is executed before any pending fact job?
(Sent this earlier, but forgot to CC the mailing list. Re-posting..)
I tried to think of a creative way you might do this. I _think_ this might work, but haven't given it a try:
Even though you only have one tower instance, you could still create two separate instance groups both pointed at your instance. Make one instance group the default used for your organization. Assign that IG most, but not all, of your resources. Reserve the second IG for the job that you need to run periodically. Assign your periodic jobs to that IG.
Afaik, this won't cause your periodic jobs to preempt any jobs that are already running or queued up, but it will ensure that tower always has resources to run your job, which I _think_ means that the job should always run pretty much as soon as its triggered.
Obviously this comes with the downside that you'd be indefinitely dedicating some of your system resources for your periodic jobs. It's an anti-pattern for sure. A _true_ priority system for jobs sounds like a really interesting feature.