-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CM-403: adjust backend to handle individual and group tasks (#39)
* CM-404: update handle change head * CM-403: add task logic to GroupIndividual update * CM-405: block more than one tasks --------- Co-authored-by: Jan <[email protected]>
- Loading branch information
1 parent
f6000aa
commit b1700a8
Showing
2 changed files
with
38 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import logging | ||
|
||
from core.service_signals import ServiceSignalBindType | ||
from core.signals import bind_service_signal | ||
from individual.services import GroupIndividualService, IndividualService | ||
|
||
from tasks_management.services import on_task_complete_service_handler | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
def bind_service_signals(): | ||
bind_service_signal( | ||
'task_service.complete_task', | ||
on_task_complete_service_handler(GroupIndividualService), | ||
bind_type=ServiceSignalBindType.AFTER | ||
) | ||
bind_service_signal( | ||
'task_service.complete_task', | ||
on_task_complete_service_handler(IndividualService), | ||
bind_type=ServiceSignalBindType.AFTER | ||
) |