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

feat: Refactor Dispatched Action db entity to use full-fat Activity #136

Open
wants to merge 8 commits into
base: edge
Choose a base branch
from

Conversation

FoxxMD
Copy link
Owner

@FoxxMD FoxxMD commented Jan 5, 2023

  • Instead of storing limited info about an Activity in the table just persist the full Activity with a relationship
  • Fixes issue on CM init where snoowrap needs to fetch all activities for dispatched actions in order to get permalinks and simplifies things in general

* Instead of storing limited info about an Activity in the table just persist the full Activity with a relationship
* Fixes issue on CM init where snoowrap needs to fetch all activities for dispatched actions in order to get permalinks and simplifies things in general
Make sure we delete Activities that were inserted on dispatched actions BUT ONLY if they are not used anywhere else (events or other delayed activities)
@FoxxMD
Copy link
Owner Author

FoxxMD commented Jan 5, 2023

This seems to work, at least in simple cases, but I found it was not finding all associated Activities correctly when used in real-world. There was also an issue with re-hydrating activities for some reason.

I think the issue stems from using entity manager methods instead of full-fat query builder methods. The EM stuff has always been inconsistent in behavior -- previously experienced it not hydrating thing correctly when implementing Actioned Events selector.

Need to refactor EM usage into explicit query builder which I think will solve this.

@FoxxMD FoxxMD changed the base branch from master to edge January 5, 2023 14:53
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.

1 participant