feat: Refactor Dispatched Action db entity to use full-fat Activity#136
Open
feat: Refactor Dispatched Action db entity to use full-fat Activity#136
Conversation
Owner
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)
Owner
Author
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.