Allows plugin jobs to be triggered via the PostHog UI. This needs a supporting PR to posthog that's coming soon.
How it works:
An endpoint in posthog receives the job specs (job name, payload) via a POST request
The request triggers sending a task to Celery which is picked up by the plugin server
The plugin server enqueues the job to be run as soon as possible, but still going through the job queues (instead of skipping to runJob directly)
A few things were built in on the posthog side as well as here that aren't yet natively supported but will help us going forward. The most important of these is the job operation, which is currently just being dumped in the payload if devs want to do anything with it. In the future this will allow us to do things like start and stop longer running jobs like imports and exports.
Checklist
[ ] Updated Settings section in README.md, if settings are affected
Changes
Allows plugin jobs to be triggered via the PostHog UI. This needs a supporting PR to
posthog
that's coming soon.How it works:
posthog
receives the job specs (job name, payload) via a POST requestrunJob
directly)A few things were built in on the
posthog
side as well as here that aren't yet natively supported but will help us going forward. The most important of these is the job operation, which is currently just being dumped in the payload if devs want to do anything with it. In the future this will allow us to do things like start and stop longer running jobs like imports and exports.Checklist