I think this is a bit more complicated than what I am looking for. All I am looking for is a way to get the result of this query:
jobs = trans.sa_session.query( trans.app.model.Job ) \
.filter( and_( trans.app.model.Job.table.c.update_time < cutoff_time,
or_( trans.app.model.Job.state == trans.app.model.Job.states.NEW,
trans.app.model.Job.state == trans.app.model.Job.states.QUEUED,
trans.app.model.Job.state == trans.app.model.Job.states.RUNNING,
trans.app.model.Job.state == trans.app.model.Job.states.UPLOAD ) ) ) \
.order_by( trans.app.model.Job.table.c.update_time.desc() ).all()
from the file /lib/galaxy/web/base/controllers/admin.py, without having to use the UI. Has anyone done something like this before?