My app must report its job load via HTTP API. The “play status” command seems to give the info I need:
Jobs execution pool:
~~~~~~~~~~~~~~~~~~~
Pool size: 0
Active count: 0
Scheduled task count: 0
Queue size: 0
How to access this info in a Play Framework controller?
Have a look at JobsPlugin.java, there’s a static executor property, the getStatus() method shows where the values come from:
https://github.com/playframework/play/blob/master/framework/src/play/jobs/JobsPlugin.java