Giter VIP home page Giter VIP logo

Comments (6)

ilvalle avatar ilvalle commented on September 1, 2024

+1

from cs_monitor_plugin.

niphlod avatar niphlod commented on September 1, 2024

ilvalle reported:

there is something odd, I'm not able to restart a stopped task, I tried to use 'clone and requeue' but after a while it is marked expired

from cs_monitor_plugin.

niphlod avatar niphlod commented on September 1, 2024

ok I got why a stopped task doesn't get executed if requeued.
When you stop a task that is RUNNING, the status will be set as FAILED
If you stop a QUEUED task, stop_time is set to "now", the enabled bit is set to False and the status is set to STOPPED.
Now, let's get to the "requeue" feature.... it copies over the stop_time AND the enabled bit....so in the first case (running task that gets stopped) it works, but for the second case (a queued task that gets stopped) it doesn't....it's eventually marked as expired and it never gets executed.
The behaviour makes perfect sense for quite every task to be requeued, because to me a task that is STOPPED means a task that it got QUEUED by mistake. That being said, it's also true that if someone wants to clone and requeue a STOPPED task, he implicitly accepts that that task is not a mistake indeed and needs to be executed. I'm going to modify the requeue_task function to allow requeuing a STOPPED task, but that means that if a stop_time had been set originally, it won't be cloned, i.e. stop_task will be None.

from cs_monitor_plugin.

ilvalle avatar ilvalle commented on September 1, 2024

I used to stop tasks across web2py updates before restarting the scheduler process otherwise after the scheduler restarted I will find a task 'RUNNING' but practically not really running.
For me 'clone and requeue' it is actually almost the same as restart/requeue, the only difference is that with the latter I will loose all the statistical information about all former executions.
Can we add the 'requeue' option for STOPPED tasks and removing the 'stop task' button (since the task is already stopped) in the tast_details page?

from cs_monitor_plugin.

niphlod avatar niphlod commented on September 1, 2024

what's missing from the current implementation ?

BTW: you'd better TERMINATE workers and wait for them to shutdown to achieve a consistent state between updates.... no need to fiddle with task's statuses at all.

from cs_monitor_plugin.

ilvalle avatar ilvalle commented on September 1, 2024

In the current view of task_details the button 'stop task' for STOPPEDs
task is useless, I would replace it with 'requeue'

Paolo

2014-05-04 22:27 GMT+02:00 niphlod [email protected]:

what's missing from the current implementation ?

BTW: you'd better TERMINATE workers and wait for them to shutdown to
achieve a consistent state between updates.... no need to fiddle with
task's statuses at all.


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-42143856
.

from cs_monitor_plugin.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.