Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »



What are HySDS Tasks?


Tasks are Celery-level python functions that are dispatched to run in the distributed workers.

Tasks are executed on workers.

Jobs are subclasses of Tasks that add notions of running a subprocess executable in a working directory of a worker.

Tasks have event states as they transition from queued to running and exit conditions.

Task events


See http://celery.readthedocs.org/en/latest/userguide/monitoring.html#task-events

task-sent

signature:

task-sent(uuid,name,args,kwargs,retries,eta,expires,queue,exchange,routing_key)

Sent when a task message is published and the CELERY_SEND_TASK_SENT_EVENT setting is enabled.

task-received

signature:

task-received(uuid,name,args,kwargs,retries,eta,hostname,timestamp)

Sent when the worker receives a task.

task-started

signature:

task-started(uuid,hostname,timestamp,pid)

Sent just before the worker executes the task.

task-succeeded

signature:

task-succeeded(uuid,result,runtime,hostname,timestamp)

Sent if the task executed successfully.

Runtime is the time it took to execute the task using the pool. (Starting from the task is sent to the worker pool, and ending when the pool result handler callback is called).

task-failed

signature:

task-failed(uuid,exception,traceback,hostname,timestamp)

Sent if the execution of the task failed.

task-revoked

signature:

task-revoked(uuid,terminated,signum,expired)

Sent if the task has been revoked (Note that this is likely to be sent by more than one worker).

  • terminatedis set to true if the task process was terminated,and thesignumfield set to the signal used.
  • expired is set to true if the task expired.

task-retried

signature:

task-retried(uuid,exception,traceback,hostname,timestamp)

Sent if the task failed, but will be retried in the future.

Active task states


are still pending additional activity

  • sent
  • received
  • started

Inactive task states


have no more activity

  • succeeded
  • failed
  • revoked
  • retired
  •  
  • No labels