Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
emil-balashov committed Feb 23, 2021
2 parents 1cd5462 + 93727d4 commit 0571d84
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
12 changes: 5 additions & 7 deletions README.md
Expand Up @@ -2,13 +2,11 @@

[![Build Status](https://travis-ci.org/Borderless360/django-logic-celery.svg?branch=master)](https://travis-ci.org/Borderless360/django-logic-celery)[![Coverage Status](https://coveralls.io/repos/github/Borderless360/django-logic-celery/badge.svg?branch=master)](https://coveralls.io/github/Borderless360/django-logic-celery?branch=master)

The main idea of [Django Logic](https://github.com/Borderless360/django-logic) is to allow developers to
implement business logic via pure functions. It’s becoming relatively difficult to following the best practices
of SOLID application and Django Framework design, especially if you want to bring to the project some background
tasks (via Celery). Django-Logic-Celery takes care of the connection between the pure functions and the business
requirements, based on a state of the model object. Please, make sure to make yourself familiar with
[Django Logic](https://github.com/Borderless360/django-logic) first, as it implements the core functionality
and the very package is the only extension allowing using Celery tasks.
The main idea of [Django Logic](https://github.com/Borderless360/django-logic) is to allow developers implementing
business logic via pure functions. Django-Logic-Celery takes care of the connection
between the pure functions and the business requirements, based on a state of the model object.
Please, make sure to make yourself familiar with [Django Logic](https://github.com/Borderless360/django-logic) first,
as it implements the core functionality and the very package is the only extension allowing using Celery tasks.


## Installation
Expand Down
19 changes: 18 additions & 1 deletion django_logic_celery/transitions.py
@@ -1,4 +1,4 @@
from django_logic import Transition
from django_logic import Transition, Action

from django_logic_celery import SideEffectTasks, CallbacksTasks, SideEffectSingleTask

Expand All @@ -18,3 +18,20 @@ class CeleryTransition(Transition):

class CelerySingleTaskTransition(Transition):
side_effects_class = SideEffectSingleTask


class InProgressAction(Action):
side_effects_class = SideEffectTasks


class CeleryCallbackAction(Action):
callbacks_class = CallbacksTasks


class CeleryAction(Action):
side_effects_class = SideEffectTasks
callbacks_class = CallbacksTasks


class CelerySingleTaskAction(Action):
side_effects_class = SideEffectSingleTask
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="django-logic-celery",
version="0.0.8",
version="0.0.9",
author="Emil Balashov",
author_email="emil@borderless360.com",
description="Django Logic Celery - background transitions",
Expand Down

0 comments on commit 0571d84

Please sign in to comment.