ngageoint / scale

Processing framework for containerized algorithms
http://ngageoint.github.io/scale/
Apache License 2.0
105 stars 45 forks source link

Make Scheduler queue ordering configurable via API #1815

Closed gisjedi closed 4 years ago

gisjedi commented 5 years ago

Pain Point? Please describe. When using Scale within a resource constrained cluster, it would be desirable to flip the ordering of the queue from the default First In First Out (FIFO) ordering to Last In First Out (LIFO). This would reduce the pain of configuration changes being buried behind a wall of outdated queued jobs.

Desired Solution The Scheduler already has the ability to flip between FIFO and LIFO processing, but it is hidden within the Scheduler database model. We just need to add the queue_mode field to the Scheduler serializer to make it configurable via the API:

https://github.com/ngageoint/scale/blob/a7043945078a0aed4de2a84b38fde1370855b41c/scale/scheduler/serializers.py#L14