tighten up code for new UJ queryset

This commit is contained in:
AlanCoding
2017-01-22 17:09:29 -05:00
parent 36c68178dd
commit f265d2fe0f
3 changed files with 6 additions and 11 deletions

View File

@@ -669,11 +669,11 @@ try:
job_idx = 0
for n in spread(n_job_events, n_jobs):
job = jobs[job_idx]
# Check if job already has events, for idempotence
if not job._is_new:
continue
sys.stdout.write('\r Creating %d job events for job %d' % (n, job.id))
sys.stdout.flush()
# Check if job already has events, for idempotence
JobEvent.objects.bulk_create([
JobEvent(
created=now(),