Gurunandan wrote:
> Hi,
>
> 1. My worker uses a "watch-reserve-fork-watch" cycle to handle jobs.
> Is this robust enough? Are there better strategies to hive off long
> jobs? I find the advantage of a running a single worker valuable.
I prefer spawning a fixed number of workers, where each one does
"watch-reserve-work-delete". That way you know the amount of workers, even if
you receive a large burst of jobs. Your way might end up forking so much that
you run out of resources.
> 2. Is there a way to set TTR, so that a job once handed to a worker is
> never timed-out? The worker will take the responsibility of putting it
> back on the queue in case of failure. Is this a Good Thing?
Yes, you can set the TTR (assuming you use Beanstalk::Client):
my $job2 = $client->put(
{ priority => 100,
ttr => 120,
delay => 5,
},
@job_data
);
I have several types of jobs that can take up to 3 days or more to complete
(they depend on highly variable amounts of input), so I use a very high TTR
for those. That works great.
> 3. What is the purpose of the "buried" state. When should I use it?
I haven't needed that feature yet, but I think it allows you to put jobs away
for processing at some later point. I suppose it works better than
re-releasing with a delay.
rhesa
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"beanstalk-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/beanstalk-talk?hl=en
-~----------~----~----~----~------~----~------~--~---