Comments (9)
@fridex, is someone working on this issue?
from selinon.
@geetikabatra I don't think so. I planned it for the eventual release of 2.0 (I didn't expect to come this in before 1.0 release). Do you have a use case for it?
from selinon.
@fridex , There is no specific use case. But I would like to work on it.
from selinon.
@geetikabatra cool! If you need any guidance or a sync, feel free to ask :)
from selinon.
@fridex, Awesome. I can spend some time reading the documentation and the code, and we can sync up around next week. Please share any other link, if there is, that might be useful to me. :)
from selinon.
@fridex, Awesome. I can spend some time reading the documentation and the code, and we can sync up around next week. Please share any other link, if there is, that might be useful to me. :)
At least basic notion about Celery tasks - notably how to schedule task (the apply_async method on Celery's task instance) and how to retrieve states of tasks. Celery's docs can be helpful http://docs.celeryproject.org/en/latest/userguide/tasks.html
A basic knowledge of Selinon will be required - see official docs at http://selinon.readthedocs.io/en/latest/internals.html
Basically, there is a need to abstract apply_async and state checking into an interface, so there will be a need to create a class:
import enum
from abc import ABCMeta
class TaskState(enum.Enum):
FINISHED
PENDING
FAILED
UNKNOWN # This will be an issue for Celery as it will always return pending state AFAIK
class SelinonBackend(metaclass=ABCMeta):
@abstractmethod
def schedule_task(self, task_name, node_args):
"""Schedule a task.
@param task_name: name of task to be scheduled
@param node_args: arguments supplied to the task
@return: task id
"""
@abstractmethod
def check_task_state(self, task_id):
"""Check state of a task.
@param task_id: id of task which state should be checked
@return: task state
"""
And check for all occurrences of async apply and state checks. The constructor of SelinonBackend should be configurable via yaml files.
Celery or Dramatiq backend will simply implement SelinonBackend interface. If there is anything not clear, feel to ask.
from selinon.
@fridex, Thanks for the explanation. I got most of it. Will let you know if I get stuck anywhere.
from selinon.
is there any progress on this issue
from selinon.
is there any progress on this issue
Not any I would be aware of.
from selinon.
Related Issues (20)
- Move cache definition to nodes.yaml
- New release with enhanced Sentry configuration HOT 1
- Using templates in yaml definition for variables ? HOT 24
- Guidance for integrating Selinon as a library HOT 3
- Comment in code thoughts ? HOT 3
- Switch from raven to sentry-sdk
- Dynamic flow creation for workers HOT 23
- how can I get the progress and state of flow? HOT 3
- Any method can get all flow jobs? HOT 5
- Using Environment variables in storage? HOT 3
- Failure Fallback task loses parent information HOT 5
- Flow error observed very often HOT 14
- Trace logging failing due to AsyncResult not serializable HOT 1
- cannot find task module HOT 1
- Configure CI for this repo
- Redis adapter does not work without password explicitly set
- Race condition with filesystem storage
- Cannot have condition on edge with python >= 3.8 HOT 3
- using celery beat with selinon
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 selinon.