Comments (5)
One possibility is to use a celery schedule in Metagov Core, and allow Metagov Plugins to register task functions. Then the Plugin author doesn't have to worry about how the polling works.
@Registry.plugin
class MyPlugin(Plugin):
@Registry.periodic_task
def poll_events(self):
"""
Function that gets called every minute/hour/day (however schedule is configured).
Useful when you can't use a webhook.
"""
events = requests.get(...) # fetch events from platform API
self.handle_event(event) # process event and send to driver
We need to be able to dynamically add and and remove scheduled tasks without restarting Django or Celery, as well as maybe dynamically changing the schedules (hourly/daily/etc) based on the plugin config.
from gateway.
I think it would be fantastic for metagov to implement polling - it would make things much easier for plugin authors. I don't really know enough about this topic to make any recommendations, though.
from gateway.
from gateway.
Yes, checking, not surveying.
from gateway.
The instructions to Drivers for how to perform async governance processes was made simpler from this change: https://docs.metagov.org/en/latest/driver_tutorial.html#performing-governance-processes
The instructions for Metagov installation was made more complicated, because of the need to set up Celery: https://docs.metagov.org/en/latest/installation.html
from gateway.
Related Issues (20)
- Perform Slack vote in multi-person DM HOT 1
- If Slack voting post is deleted by an admin, cancel the vote
- Meta-Issue for OpenCollective no-code integration HOT 2
- Change or fix links to OpenAPI Reference and Metagov API HOT 7
- Add plugin for DAOstar endpoint service (governing the DAOstar Endpoint Service using the Gateway) HOT 1
- Improve logging and service monitoring
- Vet requirements.txt
- Update how we send data to Loomio
- Decide on a name for the Metagov + OpenCollective Integration βproductβ HOT 1
- Deploy an open sandbox server at gateway.metagov.org
- Discovery and norms: Embed policy metadata in Open Collective "Collective Voice" admin profiles HOT 1
- Require Open Collective superuser bot/admin vote before approval or rejection of expense, reimbursement, or fund request HOT 1
- dev / Policy template + cloning logic
- dev / PK view for no-code integration (minimal form)
- dev / PK no-code onboarding logic
- dev / MVP policy template
- dev / Get OC integration specs
- dev / Implement PK iframe / embed with parameters needed for integration
- dev / OC integration on a staging environment
- dev / PK MVP UI HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gateway.