Skip to content

Commit

Permalink
at loop time
Browse files Browse the repository at this point in the history
  • Loading branch information
hexylena committed Jul 21, 2017
1 parent 9803dc6 commit 5abbf11
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions scripts/grt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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

Expand Down Expand Up @@ -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": {
},
Expand Down

0 comments on commit 5abbf11

Please sign in to comment.