Skip to content

Commit

Permalink
Inlining the loadEvents method
Browse files Browse the repository at this point in the history
  • Loading branch information
fulghum committed Sep 8, 2023
1 parent b06702c commit 999efb1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 0 additions & 5 deletions eventscheduler/event_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ func newEventExecutor(bgt *sql.BackgroundThreads, ctxFunc func() (*sql.Context,
}
}

// loadEvents loads the enabled events list to the eventExecutor.
func (ee *eventExecutor) loadEvents(l []*enabledEvent) {
ee.list = newEnabledEventsList(l)
}

// start starts the eventExecutor. It checks and executes
// enabled events and updates necessary events' metadata.
func (ee *eventExecutor) start() {
Expand Down
3 changes: 2 additions & 1 deletion eventscheduler/event_scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ func (es *EventScheduler) loadEventsAndStartEventExecutor(ctx *sql.Context, a *a
if err != nil {
return err
}
es.executor.loadEvents(enabledEvents)

es.executor.list = newEnabledEventsList(enabledEvents)
go es.executor.start()
return nil
}
Expand Down

0 comments on commit 999efb1

Please sign in to comment.