[Backgroundrb-devel] Get a unique job id back when enqueing a task
gethemant at gmail.com
Thu Nov 20 06:26:02 EST 2008
You can use job_key method in your worker to retrieve the job key of
current task. Its a thread local variable and hence thread safe, can
be also used inside threads without problems.
You can also use persistent_job method inside your worker to retrieve
currently executed task.
On Thu, Nov 20, 2008 at 3:59 PM, Max Williams
<toastkid.williams at gmail.com> wrote:
> This is a simple question, but i can't find the answer on the internets. Is
> there a way, when putting a job into the job queue, to get back an object
> for the BdrbJobQueue record that is created? (or at least its id)
> I need to pass a simple id around my app that will always relate to a
> specific job. At the moment i'm doing this by making a unique job key
> string and using that to create and track the job, but it's a clumsy
> approach and i'd rather just use the id from the db table, which i would
> pull from the new job object. Assuming i can get it back.
> Thanks for the help, bdrbheads. ;-)
> Backgroundrb-devel mailing list
> Backgroundrb-devel at rubyforge.org
Let them talk of their oriental summer climes of everlasting
conservatories; give me the privilege of making my own summer with my
More information about the Backgroundrb-devel