dura icon indicating copy to clipboard operation
dura copied to clipboard

Feature Request: `dura status` command

Open PJC-64 opened this issue 2 years ago • 2 comments

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.

PJC-64 avatar Feb 15 '22 14:02 PJC-64

Hi,

I like this idea! Could be useful I think.

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

drupol avatar Feb 15 '22 14:02 drupol

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.

JakeStanger avatar Feb 15 '22 15:02 JakeStanger