Skip to content

Commit

Permalink
engine/cleanupmgr: rename LookForWorkArgs types for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
mastercactapus committed Dec 18, 2024
1 parent fd5ef14 commit 4bee028
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions engine/cleanupmanager/scheddata.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ type SchedDataArgs struct {

func (SchedDataArgs) Kind() string { return "cleanup-manager-sched-data" }

type SchedDataLookForWorkArgs struct{}
type SchedDataLFW struct{}

func (SchedDataLookForWorkArgs) Kind() string { return "cleanup-manager-sched-data-look-for-work" }
func (SchedDataLFW) Kind() string { return "cleanup-manager-sched-data-lfw" }

// LookForWorkScheduleData will automatically look for schedules that need their JSON data cleaned up and insert them into the queue.
func (db *DB) LookForWorkScheduleData(ctx context.Context, j *river.Job[SchedDataLookForWorkArgs]) error {
func (db *DB) LookForWorkScheduleData(ctx context.Context, j *river.Job[SchedDataLFW]) error {
cfg := config.FromContext(ctx)
if cfg.Maintenance.ScheduleCleanupDays <= 0 {
return nil
Expand Down
2 changes: 1 addition & 1 deletion engine/cleanupmanager/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (db *DB) Setup(ctx context.Context, args processinglock.SetupArgs) error {
river.NewPeriodicJob(
river.PeriodicInterval(24*time.Hour),
func() (river.JobArgs, *river.InsertOpts) {
return SchedDataLookForWorkArgs{}, &river.InsertOpts{
return SchedDataLFW{}, &river.InsertOpts{
Queue: QueueName,
Priority: PriorityTempSchedLFW,
}
Expand Down

0 comments on commit 4bee028

Please sign in to comment.