[katello-devel] async jobs are in master

Bryan Kearney bkearney at redhat.com
Sun Jul 10 11:38:47 UTC 2011


On 07/08/2011 01:54 PM, Dmitri Dolguikh wrote:
> You can now create async jobs and track their status. You will need to
> execute db migrations after you pull in the changes.
>
> Before creating an async job make sure that you included
> AsyncOrchestration module into the model class in question. After that,
> to start an async job:
>
> System.async(:organization_id =>
> @environment.organization.id).create!(params.merge({:environment =>
> @environment})), or
> @system.async(:organization_id =>
> @environment.organization.id).regenerate_identity_certificates
>
> please note that you have to pass in organization_id in async call atm.
> The idea was to associate async jobs with organizations (for both
> security and convenience sake), not sure if it's useful.

We are getting that request on the Candlepin side.. so I think it makes 
sense.




To start async
> jobs processing, you will need to run:
> rake jobs:work
>
> To clear jobs queue, run:
> rake jobs:clear
>
> You can list all pending/running jobs in an organization:
> curl -k -u admin:admin
> https://localhost:3000/api/organizations/ACME_Corporation/tasks
>
> Or, you can get the status of a particular job (note the use of uuid for
> job id):
> curl -k -u admin:admin
> https://localhost:3000/api/tasks/fe79f0d3-bb4b-4ed7-8c5e-6bebcdace0a0
>
>
> Please also note that successfully completed jobs will be removed from
> the queue, while failed one will be left in the queue.
>
> Please let me know if you have any questions/comments/suggestions,
> -d
>
>
>
>
>
> _______________________________________________
> katello-devel mailing list
> katello-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/katello-devel




More information about the katello-devel mailing list