Skip to content

fix: can't save jobs to db when close because of mismatch context Done channels in bridge_core.NewWithContext()#50

Open
lyn1505 wants to merge 1 commit intoaxieinfinity:masterfrom
lyn1505:fix/mismatch-ctx-done-channel-in-new-controller
Open

fix: can't save jobs to db when close because of mismatch context Done channels in bridge_core.NewWithContext()#50
lyn1505 wants to merge 1 commit intoaxieinfinity:masterfrom
lyn1505:fix/mismatch-ctx-done-channel-in-new-controller

Conversation

@lyn1505
Copy link

@lyn1505 lyn1505 commented Aug 19, 2024

A bug in bridge_core.NewWithContext() will cause controller.Close() to never wrap up job pool (this line never finished):

  • The context used in controller.cancelFunc (code) is the child of the context passed to Pool (code)
  • So, when controller.Close() is called, although controller.cancelFunc() is called (code), context of Pool isn't cancelled --> jobs never get wrapped up and saved

There are the same context mismatches in other places in bridge_core.NewWithContext(), which I don't know what effects it has.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant