mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
feat(api): revamp scheduling to introduce system schedules (#2433)
* feat(api): revamp scheduling to introduce system schedules * fix(api): fix linting issues * fix(api): fix lint issues * refactor(api): fix lint issues
This commit is contained in:
parent
dbbea0a20f
commit
110fcc46a6
16 changed files with 475 additions and 297 deletions
|
@ -6,7 +6,6 @@ import (
|
|||
"github.com/gorilla/mux"
|
||||
httperror "github.com/portainer/libhttp/error"
|
||||
"github.com/portainer/portainer"
|
||||
"github.com/portainer/portainer/cron"
|
||||
"github.com/portainer/portainer/http/security"
|
||||
)
|
||||
|
||||
|
@ -39,13 +38,3 @@ func NewHandler(bouncer *security.RequestBouncer) *Handler {
|
|||
|
||||
return h
|
||||
}
|
||||
|
||||
func (handler *Handler) createTaskExecutionContext(scheduleID portainer.ScheduleID, endpoints []portainer.EndpointID) *cron.ScriptTaskContext {
|
||||
return &cron.ScriptTaskContext{
|
||||
JobService: handler.JobService,
|
||||
EndpointService: handler.EndpointService,
|
||||
FileService: handler.FileService,
|
||||
ScheduleID: scheduleID,
|
||||
TargetEndpoints: endpoints,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue