Comments (6)
Adding that support would make the configuration much more complex. I think your idea of supporting querying the environment at runtime is a reasonable one and something we need for other use cases as well!
from encore.
I agree with taking Kubernetes CronJob design approach, it looks straightforward and what I would expect without any supripses. I like the config approach as well.
I am not a fan of endpoints without params only limitation. Sometimes it would be very helpful to be able to have params available for use. If it's unreasonably time expensive to implement I will be able to live without it, no problem with that.
from encore.
Thanks @pbrazdil for the feedback! What use cases are you thinking of for passing parameters? Could you define a parameter-less endpoint for use with cron that calls another endpoint with parameters?
from encore.
What do you think about the posibility to run cron jobs for individual environments? We have a use case where we have an environment for demo purposes (a production environment) which we regularly want to add new data to.
Is there otherwise any way to dynamically in the endpoint retreive what environment we are running in, e.g. via some environment variable? In that case we could guard when to run the code.
from encore.
Seems like a good pragmatic approach for the short/mid term to me. Long term, I think it would be nice to consider the possibility of a "task/job queue" approach to this, which might let us specify some of the retry semantics, and open up the possibility of a more powerful API for programatic tasks (e.g. I want to spawn some job every hour after somebody signs up in my app for the first 8 hours). We'd also then get sub-minute resolution (I'm currently building a system outside of encore which requires this).
There are some existing projects you could take inspiration from like. https://github.com/RichardKnop/machinery
from encore.
This is now live in v0.19.0
! 🎉
from encore.
Related Issues (20)
- [BUG]: Topic missing publisher role in GCP deployment HOT 5
- Running encore on-prem/self-hosted HOT 1
- 1.15.0 is released but does not get installed by the installation script HOT 1
- Fatal error when running in debug mode HOT 3
- Can't decode query parameters to pointer types HOT 1
- Optional query parameter being sent as 'undefined'
- An unhandled panic occurred in the Encore compiler: runtime error: index out of range [3] with length 3 HOT 3
- Parser error: prob recursion HOT 4
- Install Encore CLI on Windows with scoop HOT 1
- error running encore app HOT 1
- Proposal: graceful shutdown improvements HOT 2
- Flow doesn't show databases for `sqldb.NewDatabase(...)`, only for `sqldb.Named(...)` HOT 1
- encore run panic
- Typescript generated client type error with slice optional query parameters HOT 1
- Support for other cloud providers HOT 4
- Having no tests causes the build to fail. HOT 5
- Compiler error is misleading when migrations folder is missing.
- metrics: panic handling request: runtime error: index out of range [1] with length 0
- Support optional params and enums in OpenAPI client generation HOT 3
- Support async authDataGenerator in generated typescript client 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 encore.