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

Always cancel process_invoices_job when shutting down Golem #452

Merged
merged 2 commits into from
Jun 10, 2021

Conversation

azawlocki
Copy link
Contributor

@azawlocki azawlocki commented Jun 10, 2021

Resolves #442

@azawlocki azawlocki requested review from a team and shadeofblue June 10, 2021 07:40
logger.debug("process_invoices_job cancelled")
if self._agreements_to_pay:
logger.warning("Unpaid agreements: %s", self._agreements_to_pay)

self._process_invoices_job.cancel()
Copy link
Contributor Author

@azawlocki azawlocki Jun 10, 2021

Choose a reason for hiding this comment

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

this one line was misplaced, it should always be executed

if self._agreements_to_pay:
logger.warning("Unpaid agreements: %s", self._agreements_to_pay)

await asyncio.gather(*[job.finished.wait() for job in self._jobs])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this line is a duplicate, we already do this at the beginning of this method

@azawlocki azawlocki linked an issue Jun 10, 2021 that may be closed by this pull request
@azawlocki azawlocki self-assigned this Jun 10, 2021
@azawlocki azawlocki merged commit cdf69f9 into b0.6 Jun 10, 2021
@azawlocki azawlocki deleted the az/cancel-process-invoices branch June 10, 2021 09:22
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.

ServerDisconnectedError: Server disconnected, toy service example
2 participants