Closed evermake closed 7 months ago
The runner is supposed to terminate pending calls: https://github.com/grammyjs/runner/blob/b1da579c981e1070508d6c7c352ebe7d3a886b98/src/source.ts#L181 is called by https://github.com/grammyjs/runner/blob/b1da579c981e1070508d6c7c352ebe7d3a886b98/src/runner.ts#L330 but if you observe a different behaviour, then there is a bug somewhere. Could you provide a minmal repro?
Sorry, seems like it's not related to grammY but to bun
.
Holy crap, is this another case where it executes JS incorrectly?
Seems like that. As far as I understand, the problem was with workers and/or signals controller.
When
.stop()
ing runner it doesn't abortgetUpdates
API call. As a result, it hangs until long polling interval passes (e.g. up to 30 seconds) even if there are no updates to process.This delay is annoying while developing and also when running a bot in Docker. Not sure it's a good idea to shutdown a bot using SIGKILL each time.