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

Feature Request: dura status command #94

Open
PJC-64 opened this issue Feb 15, 2022 · 2 comments
Open

Feature Request: dura status command #94

PJC-64 opened this issue Feb 15, 2022 · 2 comments

Comments

@PJC-64
Copy link
Contributor

PJC-64 commented Feb 15, 2022

I think it would be very useful to add a dura status command.

This should probably include whether or not the dura serve process is running, and it’s PID; a list of currently-watched git repos; and potentially the date/time (and tag?) of the most recent automatic commit done by dura serve, for each watched repository.

I'm not sure how that last part could be done without "knowing" the location of the log file (I run dura by using dura serve > $HOME/dura.log & so could extract it from ps, but presumably that won't always be the case).

Possible output assuming it's running, showing the time stamp but not the commit tag:

dura serve is running as PID 2756
Watching git repos:
“/home/user/repo1, last commit: 2022-02-15 14:20:35”
“/home/user/repo2, last commit: 2022-02-14 18:45:55”

If it's not running, then a line stating that, or just a non-zero status could be used.

--Paul.

@drupol
Copy link
Collaborator

drupol commented Feb 15, 2022

Hi,

I like this idea! Could be useful I think.

Todo for later: Check if running dura serve twice doesn't make issues.

@JakeStanger
Copy link
Collaborator

Todo for later: Check if running dura serve twice doesn't make issues.

It may at the moment, there's some discussion/ideas about preventing it in #2.


I like the idea, but I think we need to be careful what goes into the command. The daemon status should mostly be down to the OS's service manager (systemd or whatever), and I think we should avoid overlap here. Info like the list of watched services would be fine.

@PJC-64 PJC-64 changed the title Feature Request: status command Feature Request: dura status command Feb 15, 2022
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

3 participants