Comments (7)
Not going to happen; Celery and Channels provide very different running and transport guarantees (especially reliability).
from channels.
what If I want to use channels as celery tasks/worker?
from channels.
Then someone would have to write a full compatability layer that included the celery Task API, retry logic, delay logic, periodic task scheduler, task acknowledgement, and a whole host of other features that Celery has that Channels doesn't, deliberately (adding them into the core would mean more code complexity and slower message processing)
from channels.
well, I saw honzakral work on something like this django/django#4763 is that a good starting point? thoughts?
from channels.
That's a separate thing; any spec like that would be outside Channels and maybe a layer on top of it could implement it, but it's not in scope for this project.
from channels.
I am thinking to work on it separately so asking for your thoughts :D
from channels.
Your main problem is that you'd have to use the database for a lot of state management; because messages in Channels aren't 100% guaranteed delivery, you'd need to store the sending of the task somewhere and have logic that updates a database when the job is started and when it's completed.
You also need to manually pipe task results into the database to deliver them, since Channels has no "task return value" mechanism; you only get to send a message to get processed, you don't get to wait for the result.
Thus, you'll have to do a lot of heavy lifting using the database as the "reliable" side to supplement Channels. You do get to avoid doing a queue in the database though and making things poll it for tasks, so that's a bonus.
Once there's a Tasks abstraction it might be worth taking a shot at one that fills it in based on channels; integrating with Celery might be a lot more work unless you drop a lot of the features there.
One thing Channels does probably need is some kind of periodic message injector kind of like celerybeat, but I'm not including that in initial plans as it's not essential to any of the core work, and limiting scope will help us ship.
from channels.
Related Issues (20)
- OriginValidator could raise exception/log message for denied connections HOT 1
- Unable to collect code coverage when using `ChannelsLiveServerTestCase` HOT 14
- error in channel layer explanations HOT 2
- adding a check if group_name exists method for channel_layer HOT 1
- Small messages are getting concatenated HOT 2
- How can I change the schema in the database? HOT 1
- How to test send_json() contents when passing close=True HOT 2
- Handler declaration by decorator/annotation (in order to prevent potential method leaks) HOT 1
- django-q2 and django-channels together HOT 1
- Channel Layer's group_send() Not Working When Called From Django View HOT 3
- Add CORs middleware HOT 1
- Breakage in routing.py on django/main pre-5.1.
- Use Django async-native APIs where possible HOT 9
- Django Channels Memory Leak on every message or connection HOT 27
- WARNING daphne.server ASGIStaticFilesHandler WebRequest took too long to shut down and was killed HOT 4
- Use group_send() when group is empty HOT 1
- Session Data Corrupted HOT 1
- Error with send_json Function in AsyncJsonWebsocketConsumer HOT 6
- Getting TypeError: SSEConsumer() missing 2 required positional arguments: 'receive' and 'send'
- django.core.exceptions.SynchronousOnlyOperation
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 channels.