Documentation
¶
Overview ¶
Package worker provides a background job scheduler for running periodic maintenance tasks. Jobs are registered at startup and run according to their defined schedules.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Job ¶
type Job interface {
// Name returns the unique name of the job.
Name() string
// Schedule defines when the job should run.
Schedule() gocron.JobDefinition
// Do executes the job's task.
Do(ctx context.Context, s *service.Service, db *app.DB) error
}
Job defines the interface for a background worker job. Each job must provide a name, a schedule, and an execution function.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package cleanupchangeemailrequests ...
|
Package cleanupchangeemailrequests ... |
|
Package cleanupdeletedbooks provides a worker job for permanently removing soft-deleted books from the database after a retention period defined by ds.CleanupDeletedEntitiesAfterDays.
|
Package cleanupdeletedbooks provides a worker job for permanently removing soft-deleted books from the database after a retention period defined by ds.CleanupDeletedEntitiesAfterDays. |
|
Package cleanupdeletedusers ...
|
Package cleanupdeletedusers ... |
|
Package cleanupexpiredpasswordchangerequests ...
|
Package cleanupexpiredpasswordchangerequests ... |
|
Package cleanupexpiredusersessions ...
|
Package cleanupexpiredusersessions ... |
|
Package cleanupfiles ...
|
Package cleanupfiles ... |
|
Package deletetempfiles ...
|
Package deletetempfiles ... |
|
Package deleteunconfirmedusers ...
|
Package deleteunconfirmedusers ... |
Click to show internal directories.
Click to hide internal directories.