add onboarding task type and revert runonce
This commit is contained in:
parent
1814d0f19d
commit
db17e3e28e
@ -180,7 +180,7 @@ func (a *Agent) CreateSchedTask(st SchedTask) (bool, error) {
|
||||
Enabled: st.Enabled,
|
||||
StartBoundary: now,
|
||||
}
|
||||
} else if st.Trigger == "runonce" {
|
||||
} else if st.Trigger == "onboarding" {
|
||||
tasktrigger = taskmaster.TaskTrigger{
|
||||
Enabled: st.Enabled,
|
||||
}
|
||||
@ -205,6 +205,12 @@ func (a *Agent) CreateSchedTask(st SchedTask) (bool, error) {
|
||||
|
||||
switch st.Trigger {
|
||||
case "runonce":
|
||||
trigger = taskmaster.TimeTrigger{
|
||||
TaskTrigger: tasktrigger,
|
||||
RandomDelay: st.RandomDelay,
|
||||
}
|
||||
|
||||
case "onboarding":
|
||||
trigger = taskmaster.RegistrationTrigger{
|
||||
TaskTrigger: tasktrigger,
|
||||
Delay: st.RandomDelay,
|
||||
|
Loading…
Reference in New Issue
Block a user