Comments (6)
+1
from cs_monitor_plugin.
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.
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.
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.
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.
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)
- Elapsed time in tast_details HOT 2
- name 'prettydate' is not defined HOT 4
- Fix Readme to show how to use it HOT 3
- local variable 'status' referenced before assignment HOT 1
- License HOT 5
- Create task from homepage HOT 2
- Calendar view HOT 5
- Sorting table columns HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cs_monitor_plugin.