feat: add ability to set maintenance mode for all cron tasks running for an app

Closes #6953
This commit is contained in:
Jose Diaz-Gonzalez committed 2025-06-08 22:34:47 -04:00
1 parent cc395b54dd
commit c0eb12f572
6 files changed
+70 -28

No files matched your search

+14 -3
View File
@@ -10,14 +10,16 @@ import (
// TriggerCronGetProperty writes the cron key to stdout for a given app container
func TriggerCronGetProperty(appName string, key string) error {
validProperties := map[string]bool{
"mailfrom": true,
"mailto": true,
"mailfrom": true,
"mailto": true,
"maintenance": true,
}
if !validProperties[key] {
return errors.New("Invalid cron property specified")
}
fmt.Println(common.PropertyGet("cron", appName, key))
value := common.PropertyGetDefault("cron", appName, key, DefaultProperties[key])
fmt.Println(value)
return nil
}
@@ -57,3 +59,12 @@ func TriggerPostAppRenameSetup(oldAppName string, newAppName string) error {
func TriggerPostDelete(appName string) error {
return common.PropertyDestroy("cron", appName)
}
// TriggerSchedulerStop stops the scheduler for a given app container
func TriggerSchedulerStop(scheduler string, appName string, removeContainers string) error {
if scheduler != "docker-local" {
return nil
}
return nil
}