Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
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
16 changes: 0 additions & 16 deletions 16 core/environment/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -1236,22 +1236,6 @@ func (env *Environment) subscribeToWfState(taskman *task.Manager) {
env.setState(wfState.String())
}
}
toStop := env.Workflow().GetTasks().Filtered(func(t *task.Task) bool {
t.SetSafeToStop(true)
return t.IsSafeToStop()
})
if len(toStop) > 0 {
taskmanMessage := task.NewTransitionTaskMessage(
toStop,
sm.RUNNING.String(),
sm.STOP.String(),
sm.CONFIGURED.String(),
nil,
env.Id(),
)
taskman.MessageChannel <- taskmanMessage
<-env.stateChangedCh
}
})
break WORKFLOW_STATE_LOOP
}
Expand Down
22 changes: 20 additions & 2 deletions 22 core/environment/transition_goerror.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ package environment

import (
"github.com/AliceO2Group/Control/core/task"
"github.com/AliceO2Group/Control/core/task/sm"
)

func NewGoErrorTransition(taskman *task.Manager) Transition {
Expand All @@ -42,7 +43,24 @@ type GoErrorTransition struct {
}

func (t GoErrorTransition) do(env *Environment) (err error) {
// We do not do anything here, because the error handling was already implemented elsewhere
// and we do not expose this transition to external calls (e.g. from the GUI).

// we stop all tasks which are in RUNNING
toStop := env.Workflow().GetTasks().Filtered(func(t *task.Task) bool {
t.SetSafeToStop(true)
return t.IsSafeToStop()
})
if len(toStop) > 0 {
taskmanMessage := task.NewTransitionTaskMessage(
toStop,
sm.RUNNING.String(),
sm.STOP.String(),
sm.CONFIGURED.String(),
nil,
env.Id(),
)
t.taskman.MessageChannel <- taskmanMessage
<-env.stateChangedCh
}

return
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.