mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 04:17:55 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user