-
Notifications
You must be signed in to change notification settings - Fork 386
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
fix(python): stop processes when force stop #1837
Conversation
python/bullmq/worker.py
Outdated
|
||
self.closing = True | ||
|
||
await self.blockingRedisConnection.close() | ||
await self.redisConnection.close() | ||
|
||
def cancelProcessing(self): | ||
print('hola') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be some debug code left here.
python/bullmq/worker.py
Outdated
print('hola') | ||
for job in self.processing: | ||
print('1u') | ||
hola = job.cancel() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the effect of job.cancel()?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it will stop the execution of that job as in https://www.pythontutorial.net/python-concurrency/python-cancel-tasks/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting.
## [3.12.1](v3.12.0...v3.12.1) (2023-05-05) ### Bug Fixes * **python:** stop processes when force stop ([#1837](#1837)) ([514699c](514699c)) * **worker:** close open handles after closing ([#1861](#1861)) fixes [#1312](#1312) ([39286e8](39286e8)) ### Features * **python:** accept redis options as string ([01f549e](01f549e)) * **python:** add moveToDelayed job method ([#1849](#1849)) ([5bebf8d](5bebf8d)) * **python:** add retry method into job ([#1877](#1877)) ([870da45](870da45)) * **python:** add updateData method ([#1871](#1871)) ([800b8c4](800b8c4)) * **python:** add updateProgress method in job class([#1830](#1830)) ([e1e1aa2](e1e1aa2)) * **python:** save stacktrace when job fails ([#1859](#1859)) ([0b538ce](0b538ce)) * **python:** support retryJob logic ([#1869](#1869)) ([b044a03](b044a03))
No description provided.