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: add a 0.1 sleep to resolve 100% cpu when redis disconnects #1940

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gonzafirewall
Copy link

Added a 0.1 sleep because this issue makes servers that I use like workers and scale using CPU measure scale to max when redis has some issue.

@@ -199,3 +200,4 @@ def extract_result(job_task):
# print error message and ignore the job
print("ERROR:", e)
traceback.print_exc()
time.sleep(0.1)
Copy link
Collaborator

Choose a reason for hiding this comment

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

there is a retry strategy in node version https://github.com/taskforcesh/bullmq/blob/master/src/classes/worker.ts#L862-L876 you can use it as reference

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.

None yet

2 participants