Skip to content
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

Show "Done!" message for 5 seconds after one-off task is run #141

Open
aguynamedben opened this issue Sep 22, 2022 · 2 comments
Open

Show "Done!" message for 5 seconds after one-off task is run #141

aguynamedben opened this issue Sep 22, 2022 · 2 comments

Comments

@aguynamedben
Copy link

aguynamedben commented Sep 22, 2022

Hi, I just discovered prodigy and it's great so far.

Is there a recommended way to deal with one-off tasks? I have:

(prodigy-define-service
  :name "rustcpp - cargo run"
  :command "cargo"
  :args '("run")
  :cwd "~/code/rustcpp"
  :tags '(rust)
  :stop-signal 'sigkill
  :kill-process-buffer-on-stop t)

(prodigy-define-service
  :name "rustcpp - cargo build"
  :command "cargo"
  :args '("build")
  :cwd "~/code/rustcpp"
  :tags '(rust)
  :stop-signal 'sigkill
  :kill-process-buffer-on-stop t
  :ready-message "Finished dev")

The first command, cargo run, is a service that has a traditional "start/stop/restart" flow, but the second command, cargo build is a one-off build script that gives RC 0 and the "Finished dev" message. Is there a way to get the UI of prodigy to just say "Done!" or something? I've set :ready-message "Finished dev" but that makes the UI say "Ready".

image

It would be cool if I could provide the parameter :one-off-task 1 to the prodigy service, and after seeing RC 0 the UI of prodigy would say "Done!" for 5 seconds, then go "blank" again. Does that make sense?

Thanks for providing this great library.

@rejeep
Copy link
Owner

rejeep commented Sep 22, 2022

I think I had this idea in the past as well (something like :type 'batch IIRC). For example when coding Rails I might want to run or rollback migrations.

It was too long ago I worked on the code, so I couldn't tell you how complicated it would be to implement, but you are welcome to try. 🙂

@aguynamedben
Copy link
Author

@rejeep Cool, I'll let you know if I get around to it... thanks for making this available in the first place. Emacs 4 lyfe :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants