Revision d21d09d6 lib/jqueue.py
b/lib/jqueue.py | ||
---|---|---|
344 | 344 |
@param job: the job to be processed |
345 | 345 |
|
346 | 346 |
""" |
347 |
logging.debug("Worker %s processing job %s",
|
|
347 |
logging.info("Worker %s processing job %s",
|
|
348 | 348 |
self.worker_id, job.id) |
349 | 349 |
proc = mcpu.Processor(self.pool.queue.context) |
350 | 350 |
self.queue = queue = job.queue |
... | ... | |
352 | 352 |
try: |
353 | 353 |
count = len(job.ops) |
354 | 354 |
for idx, op in enumerate(job.ops): |
355 |
op_summary = op.input.Summary() |
|
355 | 356 |
try: |
356 |
logging.debug("Op %s/%s: Starting %s", idx + 1, count, op) |
|
357 |
logging.info("Op %s/%s: Starting opcode %s", idx + 1, count, |
|
358 |
op_summary) |
|
357 | 359 |
|
358 | 360 |
queue.acquire() |
359 | 361 |
try: |
... | ... | |
408 | 410 |
finally: |
409 | 411 |
queue.release() |
410 | 412 |
|
411 |
logging.debug("Op %s/%s: Successfully finished %s",
|
|
412 |
idx + 1, count, op)
|
|
413 |
logging.info("Op %s/%s: Successfully finished opcode %s",
|
|
414 |
idx + 1, count, op_summary)
|
|
413 | 415 |
except CancelJob: |
414 | 416 |
# Will be handled further up |
415 | 417 |
raise |
... | ... | |
420 | 422 |
op.status = constants.OP_STATUS_ERROR |
421 | 423 |
op.result = str(err) |
422 | 424 |
op.end_timestamp = TimeStampNow() |
423 |
logging.debug("Op %s/%s: Error in %s", idx + 1, count, op) |
|
425 |
logging.info("Op %s/%s: Error in opcode %s", idx + 1, count, |
|
426 |
op_summary) |
|
424 | 427 |
finally: |
425 | 428 |
queue.UpdateJobUnlocked(job) |
426 | 429 |
finally: |
... | ... | |
449 | 452 |
status = job.CalcStatus() |
450 | 453 |
finally: |
451 | 454 |
queue.release() |
452 |
logging.debug("Worker %s finished job %s, status = %s",
|
|
453 |
self.worker_id, job_id, status)
|
|
455 |
logging.info("Worker %s finished job %s, status = %s",
|
|
456 |
self.worker_id, job_id, status) |
|
454 | 457 |
|
455 | 458 |
|
456 | 459 |
class _JobQueueWorkerPool(workerpool.WorkerPool): |
Also available in: Unified diff