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

[postgres_persistence] Remove param on_flush. #106

Closed
wants to merge 2 commits into from

Conversation

aelkheir
Copy link

Removes parameter PostgresPersistence.on_flush since it has no effect. (reference)

@Bibo-Joshi
Copy link
Member

Hi. Sorry for getting back late on this PR.
Looking at the changes, I think that there actually is a misunderstanding: Yes persistence.update_*_data is called depending on the update_interval parameter. However, the parameter on_flush specifies whether each of those calls also automatically writes to database or only keeps the data in memory. if on_flush=True, writing to DB happens only on shutdown, when the Application explicitly calls flush.

@aelkheir
Copy link
Author

aelkheir commented May 26, 2024

Hi! not a problem ^^

if on_flush=True, writing to DB happens only on shutdown, when the Application explicitly calls flush

ooh, that does clarify it. I guess I was confused b/c I didn't know when was flush called internally and assumed it should happen after callback had finished. I also now see its mentioned in PostgresPersistence.flush docstring.

I'll be closing. Thanks for the clarification

@aelkheir aelkheir closed this May 26, 2024
@aelkheir aelkheir deleted the on-flush-remove branch May 26, 2024 22:09
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