On Wed, Oct 2, 2013 at 4:13 PM, Niphlod <[email protected]> wrote:

>
>
> Il giorno mercoledì 2 ottobre 2013 15:15:16 UTC+2, Marin Pranjić ha
> scritto:
>
>> Hi,
>>
>> I have a task queue that runs in the background. I want to switch to
>> scheduler because I need more workers.
>> Queued tasks are long running (video transcoding, 10-20 minutes each).
>>
>> 1. If I terminate (Ctrl+C) scheduler process, scheduler_run record is
>> STOPPED and scheduler_task record is back to QUEUED status. That's cool.
>> What happens if there is a system failure or power supply loss? Is the
>> record stuck at RUNNING or is there a mechanism that 'fixes' invalid state
>> once scheduler is up again?
>> This is likely to happen multiple times.
>>
>
> How do you handle it is up to you. schedule a task that inspects what has
> been done by your task, eventually prune temporary files, reschedule the
> task, do whatever you need. There's no limits in configuration because
> anyone needs different type of tasks ("retry blindly" vs "stop and warn me"
> approaches are very different and scheduler doesn't pose a limit on those).
> However in that particular case (assuming your using a TIMEOUT, which you
> definitely **should**) tasks in RUNNING will be marked as TIMEOUT.
>
>

What do you mean "using a TIMEOUT" ?
I just tried: killall -s SIGKILL while my task was running. Once I started
scheduler again it was set to ASSIGNED. This is what I want, but I don't
understand timeout thing, can you please explain?


>
>> 2. Is there a way of stopping a task without terminating a worker?
>>
>>
> Nope, but it's not that hard to schedule the os to restart a worker if
> it's killed, and it's a task better handled separately (attached processes,
> zombie resources, etc).
> If you follow the deployment config with upstart as soon as it's killed it
> restarts automatically.
>
>

I'm not sure if I understand. I have 4 workers running, and I need to kill
only one of them and restart it. I don't want to restart other 3 workers.
How do I do that?


>  --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to