Repository navigation
feat(admin): show job type, target and trigger in the jobs panel - #10
Merged
Merged
Conversation
The jobs panel now names each Hangfire job in plain words, shows the package or record it works on, and records what enqueued it: a schedule, an HTTP request, or another job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The admin Jobs panel now shows, for every queued, running and finished Hangfire job, a readable job type, the package or record it works on, and what triggered it.
Why
The panel listed jobs only by their method name (
IPackageTrustService.RefreshAsync,IPackageCacheService.GetOrFetchMetadataAsync), so it was impossible to tell which package a job was about or why it had been queued.Changes
JobDescriptions(Application) maps each job method to a label (Security scan,Metadata refresh,Release notes scrape,Cache refresh sweep, ...) and reads the target from the job arguments: registry and package, the version range of anAnalyzeRequest, a short audit id, a blog post id. Unknown jobs fall back to their humanised method name.JobTriggerFilter(API) is a global Hangfire client/server filter. When a job is created it stores aTriggeredByjob parameter:Job #id · <label>when enqueued from inside another job,Request · <METHOD> <path>when enqueued during an HTTP request (path only, no query string). Jobs created by the recurring scheduler are shown asSchedule · <recurring id>from Hangfire's ownRecurringJobIdparameter.RecentJobInfo/QueuedJobInfogainJobType,Registry,DetailandTriggeredBy;JobNamekeeps the technical name, so the existing parent/child grouping is unchanged.AddHttpContextAccessor()is registered for the filter.Notes for reviewers
TriggeredByparameter and show "Not recorded" (recurring ones still show their schedule).Checklist
developand is about one thingfeat(scope): ...,fix(scope): ...)admin-jobs.ts)