-
-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expand manual:yes to work for run/task and sysv as well as service #274
Comments
Hmm, yeah that doesn't sound right. I'll look into it! |
Turns out I'm adding this to the v4.4 release cycle, opening it up for run/task and sysv types as well. |
Very helpful, how does manual:yes work when used together with conditions? |
A One possibility I see here is to discuss the semantics for Alternatives I see:
I think alternative 2 is very appealing. |
I like (2) as it fits my use case. But could I suggest a slight modification because I think having behaviour only for manual:yes could be confusing. What about this....
This way the behaviour is very clear and it doesn't break any backwards compatibility. The user can repeatedly run HOWEVER if the user knows that they absolutely want to run the task again (which is my use case) then they can use In future, it might be nice to have another flag to ignore conditions as well, say -ff but that might get complicated now I guess. |
I dunno, since ... I argue that since run/task are by their very nature different from service, we can define what |
Just realised -f is used for something, perhaps we could use something else even a whole new command.
|
I see, so if you want a task to be able to be run multiple times AND automatically you would have two task definitions, one manual and one automatic. The automatic one will only ever run once (or with a specific service reload) and the manual task will always run when requested? |
Yes, that's the way I see it. |
Thank you for completing this, very useful for me. Wanted to ask your thoughts on the status, so at the moment the script shows as "stopped". I found this a bit confusing when using the manual:yes. Could I suggest a new status called "manual" or perhaps setting "ready" like it's waiting for the condition of manually running to be fufilled? This way I can look at the list and instantly know the status. |
I also found that if a task that's set with manual:yes task exits with non zero exit code, then will show as "stopped". So there's no way to know if it was run and succeeded, waiting to be run or ran and failed. I was hoping to get a clear overview of the system by looking at the initctl status command . |
OK, hope this helps:
A manual:yes task that exits with a non-zero exit code looks like this:
To make this easier to script we have #273 which I hope to get back to soon as well. |
This is a follow-up to #274, in which Andy pointed out that ending up in state 'stopped' was a bit confusing for manual:yes run/tasks. With the following change we let all run/tasks end in state 'done', yet still allow manual:yes ones to transition to 'ready' when the user calls `initctl start foo`. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This one kept bugging me. So I decided to change the implementation for manaul:yes run/tasks slightly in 96257cc. With this last change all run/tasks end up in state Calling |
Great!! I like it :) I will test it after a code merge this week |
manual:yes seems to be not supported for task definitions (?)
This appears to execute immediately even though I'm asking it to be manual.
The text was updated successfully, but these errors were encountered: