From 5abbf1102ed93b5d78bb126a571cef8e07a95b4e Mon Sep 17 00:00:00 2001 From: E Rasche Date: Fri, 21 Jul 2017 15:14:11 +0000 Subject: [PATCH] at loop time --- scripts/grt.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/grt.py b/scripts/grt.py index 2e9e92d5ce4..f2a5f375ce6 100644 --- a/scripts/grt.py +++ b/scripts/grt.py @@ -157,12 +157,6 @@ def main(argv): sa_session = model.context.current # Fetch jobs COMPLETED with status OK that have not yet been sent. - jobs = sa_session.query(model.Job)\ - .filter(sa.and_( - model.Job.table.c.state == "ok", - model.Job.table.c.id > last_job_sent - ))\ - .all() # Set up our arrays active_users = defaultdict(int) @@ -171,7 +165,12 @@ def main(argv): san = Sanitization(config['blacklist']) # For every job - for job in jobs: + for job in sa_session.query(model.Job)\ + .filter(sa.and_( + model.Job.table.c.state == "ok", + model.Job.table.c.id > last_job_sent + ))\ + .all(): if job.tool_id in config['blacklist'].get('tools', []): continue @@ -216,6 +215,7 @@ def main(argv): with open(REPORT_BASE + '.json', 'w') as handle: json.dump({ "version": 1, + "galaxy_version": gxconfig.version_major, "generated": REPORT_IDENTIFIER, "metrics": { },