Comments (2)
@AnandHiremath, you won't be able to run Celery with Cloud Functions as they do not have active CPU after the request is gone. That's what the error states:
RuntimeError: Working outside of request context.
This typically means that you attempted to use functionality that needed
an active HTTP request. Consult the documentation on testing for
information about how to avoid this problem.
You best possible approach here would be to jump off to Cloud Run and use its CPU always allocated
feature (check out the docs here: https://cloud.google.com/run/docs/configuring/cpu-allocation).
from functions-framework-python.
What @xSAVIKx says is correct, so you may try this with Cloud Run and CPU allocation enabled to see if that resolves the issue. I cannot speak to if there are Celery settings to work around this.
from functions-framework-python.
Related Issues (20)
- Ability to pass runtime environment variables for local testing
- functions-framework does not use the sourced venv HOT 2
- Not able to run locally HOT 1
- Debug flag broken HOT 2
- Unit tests are failing
- Code behaves differently with debug flag HOT 2
- The framework default Gunicorn configs do not make sense for Gen2 environments HOT 5
- remove requirement for requirements.txt when specifying dependencies for deploying to functions: support poetry HOT 3
- Exception has occurred: SystemExit 3 HOT 6
- Symbolic linking within the Source Directory to include shared local directories.
- Firebase Functions Support HOT 1
- Possibility for multiple target/signature-type pairs?
- Gunicorn 21 is out HOT 3
- Add Flask 3 support HOT 2
- README.md - Flask "Request" object hyperlink is broken HOT 2
- Native support for Pydantic models for function_framework.typed
- Document functions_framework.typed
- Support for postponed annnotations
- Improve developer experience for uncaught exceptions on GCP 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 functions-framework-python.