feat(assessment): add the review band of attempt signals and the disclosed collector
This commit is contained in:
1 parent
68286af8b7
commit
b3c6dc870b
124 files changed
+13522
-633
No files matched your search
@@ -10,6 +10,7 @@ import (
|
||||
"lincodex/backend/internal/adapter/secondary/postgres"
|
||||
"lincodex/backend/internal/adapter/secondary/prometheus"
|
||||
"lincodex/backend/internal/port/inbound"
|
||||
"lincodex/backend/internal/usecase/assessment"
|
||||
"lincodex/backend/internal/worker/jobrunner"
|
||||
"lincodex/backend/internal/worker/retry"
|
||||
)
|
||||
@@ -29,11 +30,12 @@ const (
|
||||
var _ jobrunner.Metrics = (*prometheus.Metrics)(nil)
|
||||
|
||||
// jobHandlers lists the scheduled job handlers, one per kind. A product
|
||||
// module adds its handler here, for example the invitation response
|
||||
// deadline, and the worker then claims jobs of that kind with the next
|
||||
// deployment. Jobs of a kind without a handler wait in the database.
|
||||
func jobHandlers() []inbound.JobHandler {
|
||||
return []inbound.JobHandler{}
|
||||
// module adds its handler here, and the worker then claims jobs of that kind
|
||||
// with the next deployment. Jobs of a kind without a handler wait in the
|
||||
// database. The only kind now is the computation of the assessment review
|
||||
// band, which can never block or change a result.
|
||||
func jobHandlers(logger *slog.Logger) []inbound.JobHandler {
|
||||
return []inbound.JobHandler{assessment.NewSignalReviewJob(logger)}
|
||||
}
|
||||
|
||||
func newJobWorker(
|
||||
@@ -42,7 +44,7 @@ func newJobWorker(
|
||||
logger *slog.Logger,
|
||||
metrics *prometheus.Metrics,
|
||||
) (*jobrunner.Worker, func(), error) {
|
||||
return buildJobWorker(ctx, settings, logger, metrics, jobHandlers())
|
||||
return buildJobWorker(ctx, settings, logger, metrics, jobHandlers(logger.With(slog.String("component", "assessment_review"))))
|
||||
}
|
||||
|
||||
// buildJobWorker builds the scheduled job worker and the PostgreSQL pool it
|
||||
|
||||
Reference in new issue
Block a user