-
Notifications
You must be signed in to change notification settings - Fork 1.9k
refactor(plugin-server): Trigger public jobs with graphile insted of celery queue #9811
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
Merged
Conversation
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
tiina303
commented
May 17, 2022
@@ -16,7 +15,6 @@ | |||
from rest_framework.response import Response | |||
|
|||
from posthog.api.routing import StructuredViewSetMixin | |||
from posthog.celery import app as celery_app |
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.
the periodic tasks are still setup because we import celery in async migrations
Twixes
requested changes
May 17, 2022
d029a1b
to
b5ae944
Compare
Twixes
approved these changes
May 19, 2022
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.
fuziontech
added a commit
that referenced
this pull request
May 19, 2022
* master: refactor(ingestion): Make `KAFKA_ENABLED` true by default and set `KAFKA_HOSTS` default (#9844) feat(apps): transpile frontend.tsx (#9828) feat: show api call status when adding insights to dashboards (#9817) feat: track metrics on zapier hook firings (#9866) fix(onboarding): instrumentation (#9845) feat(whitelabel-shared-dashboard): Hide branding on shared dashboards paid (#9849) fix(apps): plugin source quickfix (#9862) refactor(plugin-server): Remove `ts-jest`, use `jest.mocked` (#9861) refactor(plugin-server): Trigger public jobs with graphile insted of celery queue (#9811) chore: upgrade pip tools (#9859) feat(apps): plugin source in its own model, part 2 (#9854) chore: Update sprint_planning_retro.md (#9791) feat(apps): plugin source in its own model, part 1 (#9853) feat(matrix): Add option to save `simulate_matrix` like `setup_dev` (#9836) fix(cohort): add mapping from event to person (#9841) feat(person-on-events): Enable CI to run using both old and new queries (#9814)
alexkim205
pushed a commit
that referenced
this pull request
May 23, 2022
…celery queue (#9811) Co-authored-by: Michael Matloka <dev@twixes.com>
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.
Problem
We used to trigger public jobs by going to celery queue -> piscina -> use the node graphile api to trigger the job (here)
We now use sql directly to trigger the jobs, which is equivalent and more efficient, more info
Part of #9763
Changes
👉 Stay up-to-date with PostHog coding conventions for a smoother review.
How did you test this code?
Ran locally (
DEBUG=1 ./bin/start
)made sure normal scheduled jobs still worked (added print to async migration health checker and changed the frequency to every minute)
checked that a public job worked, tested with Yakko's newsletter listSubscribers:
posthog.capture('test-id', 'newsletter_subscribe', properties={'new_subscriber_email': 'already@t.com'})