just command for reading journald db #1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
We already use structured journald logs as a form of database, ow I want a
just statsor similar just script which gives an overview of the jobs found in the logs.Include the trigger type, outcome, money spent. etc
Rfer to readme
@Claude retry
I added
just statsand opened #2 for it.just statsprints a line per job: start time, thread, trigger (labelormention), requester, outcome, turns and cost. Below that are totals by trigger, outcome, repository and requester. It passes extra arguments tojournalctl, sojust stats --since=-7dorjust stats REPO=someone/widgetwork.The journal didn't record trigger or outcome as fields, so I made two changes in
job.rb:TRIGGERandACTORwhen it starts.finishedentry withOUTCOMEwhen it ends:pull_request,replied,silent,rejectedorerror.Jobs from before this change show
?for trigger, requester and outcome. The README describes the recipe under Logs.I tried
libexec/statsonly on hand-made journal JSON, not on a real journal. I couldn't runbundle exec rake, because the gems aren't installed here, so thejob.rbchange hasn't been run through the tests.@Claude now I also want a
just jobswhich lists the currently running jobs with systemctl statusI added
just jobsand opened it as #3. It lists the runningclaude-forge-agent@*.serviceunits and runssystemctl statuson them. With no jobs running it prints "No jobs running" instead of letting systemctl fail on a glob that matches nothing.I haven't seen it run against a live job. The sandbox can't reach the system bus, so I only confirmed that
just --listshows the recipe and thatjust jobsprints "No jobs running".just statusalready shows the bot service together with all loaded agent units.jobsshows only the agent units that are running.