Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add dedicated basic module status - hooks disabled #453

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pkg/module_manager/models/modules/basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,8 @@ const (
EnableScheduleBindings ModuleRunPhase = "EnableScheduleBindings"
// CanRunHelm - module is ready to run its Helm chart.
CanRunHelm ModuleRunPhase = "CanRunHelm"
// HooksDisabled - module has its hooks disabled (before update or deletion).
HooksDisabled ModuleRunPhase = "HooksDisabled"
)

type moduleState struct {
Expand Down
2 changes: 2 additions & 0 deletions pkg/module_manager/module_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -927,6 +927,8 @@ func (mm *ModuleManager) DisableModuleHooks(moduleName string) {
for _, mh := range schHooks {
mh.GetHookController().DisableScheduleBindings()
}

ml.SetPhase(modules.HooksDisabled)
}

func (mm *ModuleManager) HandleScheduleEvent(crontab string, createGlobalTaskFn func(*hooks.GlobalHook, controller.BindingExecutionInfo), createModuleTaskFn func(*modules.BasicModule, *hooks.ModuleHook, controller.BindingExecutionInfo)) error {
Expand Down
Loading