Skip to content

Commit

Permalink
fix(hooks): fix stop task for poller (#2246)
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Coenen <[email protected]>
  • Loading branch information
bnjjj committed Feb 16, 2018
1 parent efde23f commit 4d1684f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion engine/hooks/hooks_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ func (s *Service) deleteTaskBulkHandler() api.Handler {

//Stop the task
if err := s.stopTask(ctx, t); err != nil {
return sdk.WrapError(sdk.ErrNotFound, "Hook> putTaskHandler> stop task")
return sdk.WrapError(sdk.ErrNotFound, "Hook> putTaskHandler> stop task %s", err)
}
//Delete the task
s.Dao.DeleteTask(t)
Expand Down
2 changes: 1 addition & 1 deletion engine/hooks/tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ func (s *Service) stopTask(ctx context.Context, t *sdk.Task) error {
s.Dao.SaveTask(t)

switch t.Type {
case TypeWebHook, TypeScheduler, TypeRepoManagerWebHook:
case TypeWebHook, TypeScheduler, TypeRepoManagerWebHook, TypeRepoPoller:
log.Debug("Hooks> Tasks %s has been stopped", t.UUID)
return nil
default:
Expand Down

0 comments on commit 4d1684f

Please sign in to comment.