Skip to content
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

Merged
merged 3 commits into from
Apr 21, 2023

Conversation

roggervalf
Copy link
Collaborator

No description provided.


self.closing = True

await self.blockingRedisConnection.close()
await self.redisConnection.close()

def cancelProcessing(self):
print('hola')
Copy link
Contributor

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.

print('hola')
for job in self.processing:
print('1u')
hola = job.cancel()
Copy link
Contributor

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()?

Copy link
Collaborator Author

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/

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting.

@roggervalf roggervalf merged commit 514699c into master Apr 21, 2023
@roggervalf roggervalf deleted the fix-stop-stall-processes-force branch April 21, 2023 13:23
github-actions bot pushed a commit that referenced this pull request May 5, 2023
## [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))
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.

2 participants