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

Serialize just once random_referenced objects #700

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

prescod
Copy link
Contributor

@prescod prescod commented Jul 11, 2022

If a just_once template created multiple objects, and was randomly referenced,
only the most recently created object was saved across continuations. Now they
are all saved.

Also added code to de-serialize LazyLoadedObjectRecords from the SQL DB so they
can be serialized as YAML for continuation.

@prescod prescod requested a review from a team as a code owner July 11, 2022 13:07
jofsky
jofsky previously approved these changes Jul 11, 2022
@@ -130,6 +130,7 @@ def __init__(
# They survive iterations and continuations.
self.persistent_nicknames = {}
self.persistent_objects_by_table = {}
self.persistent_random_referenceable_objects = []
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason this isn't a dict?

Copy link
Contributor Author

@prescod prescod Jul 12, 2022

Choose a reason for hiding this comment

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

Does b671d0f clarify, @jofsky ?

@prescod prescod enabled auto-merge (squash) September 15, 2022 20:20
auto-merge was automatically disabled February 8, 2023 20:32

Merge queue setting changed

@prescod prescod marked this pull request as draft April 26, 2023 05:06
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