Only try to get current job when device is running in all_devices()
For some reason yet unknown, calling `.current_job()` on a Device
object when its state is not "running" can cause some server errors.
This is likely to be due to some discrepancy in the database. The
schedule.all_devices() XMLRPC call causes an HTTP502 when this
happens. Work around this problem by only looking for the current job
of devices that are in the running state.
Signed-off-by:
Guillaume Tucker <guillaume.tucker@collabora.com>
Showing
Please register or sign in to comment