Skip to content
treeder edited this page Mar 26, 2012 · 1 revision

To get the status of a task or schedule job, you can use the status method with the worker instance.

status = worker.status

If you don't have the object in memory anymore and want to check it later, just save the task id then use the service method.

Get the task id and save it for later:

task_id = worker.task_id

Then at any point in the future:

status = IronWorker.service.status(task_id)

Waiting Until Job Completes

There is a convenience method wait_until_complete to use that will wait until the status returned from a queued task is completed or error.

worker.queue
status = worker.wait_until_complete

You can also call the IronWorker class with the worker.task_id.

status = IronWorker.service.wait_until_complete(task_id)

Note that wait_until_complete is for use with the queue method and not intended for run_local and schedule.

Schedule Status

To get the status of a scheduled job using the worker instance, use the status or schedule_status method.

status = worker.schedule_status

If you have the schedule ID, you can make an API service call to :

IronWorker.service.schedule_status(schedule_id)
Clone this wiki locally