fix(scheduler): the session cleanup generator is reset too often (#2220)

This causes the "fair" scheduler to run it too often in the detriment of other generators.
The intention was to run it every 2 hours but the measurement unit for 7200 was not specified.

Add more logs, including showing a generator name, in order to troubleshoot this kind of issues easier in the future.

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
This commit is contained in:
Andrei Aaron
2024-02-01 19:15:53 +02:00
committed by GitHub
parent ce4924f841
commit 6a83dd47c0
10 changed files with 57 additions and 3 deletions
+4
View File
@@ -90,6 +90,10 @@ func NewTaskGenerator(service Service, log log.Logger) *TaskGenerator {
}
}
func (gen *TaskGenerator) Name() string {
return "SyncGenerator"
}
func (gen *TaskGenerator) Next() (scheduler.Task, error) {
if err := gen.Service.SetNextAvailableURL(); err != nil {
return nil, err