feat(14-02): conga.Describe reports a registered job's kind, queue, attempts and timeout

- lets a plugin test assert what its Jobs() registers, such as the CSV
  match job's 240 s timeout, without reaching into conga internals
- README API table, jobs docs page and an example
This commit is contained in:
Jakub Zych
2026-10-03 20:56:49 +02:00
parent 0a7635b12a
commit cdd8d710fa
4 changed files with 34 additions and 1 deletions

View File

@@ -174,3 +174,11 @@ func TestDocsDispatch(t *testing.T) {
time.Sleep(25 * time.Millisecond)
}
}
func ExampleDescribe() {
job := conga.Job(func(ctx context.Context, args ImportPostsArgs) error { return nil },
conga.OnQueue("imports"), conga.Timeout(4*time.Minute))
info, ok := conga.Describe(job)
fmt.Println(ok, info.Kind, info.Queue, info.MaxAttempts, info.Timeout)
// Output: true acme_blog_import_posts imports 0 4m0s
}