-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Different async action mapping approach #3678
Merged
Merged
Conversation
This file contains 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
Twixes
changed the title
Different async approach
Different async action mapping approach
Mar 17, 2021
4 tasks
macobo
reviewed
Mar 17, 2021
macobo
reviewed
Mar 17, 2021
macobo
reviewed
Mar 18, 2021
macobo
reviewed
Mar 18, 2021
macobo
reviewed
Mar 18, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM other than the unresolved question on webhooks. Once that's resolved, feel free to merge. :)
Twixes
added a commit
that referenced
this pull request
Mar 18, 2021
* Disable useless InsecureRequestWarning * Disallow ASYNC_EVENT_ACTION_MAPPING on CH and make it default otherwise * Return early from calculate_actions_from_last_calculation if CH * Optimize Action.calculate_events and fire hooks from it * Run calculate_event_action_mappings every 30 s instead of 5 min * Optimize post_event_to_webhook thanks to new actions approach * Add Event.site_url field for reworked Postgres webhooks * Adjust tests by using sync calls to actions calculation * Update calculate_action.py * Use assertEntityResponseEqual more * Update test_capture_new_person for Cloud * Don't async calculate actions that haven't finished last calculation * Fix is_calculating condition place * Improve calculate_actions_from_last_calculation logging * Clean up event_query, params * Fix .only usage * Update migration
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.
Changes
This makes async calculation of new action-event pairs every 30 seconds the new and default approach.
Benefits over the previous async approach:
Benefits over the previous on-the-fly approach:
In the future we may want to hand off action calculation to the plugin server (PostHog/plugin-server#235), but that will require a serious effort with exact porting of the matching logic, which we do not want to do now.
Closes #3627 (Marius's WIP PR). Resolves #3576.
Checklist