File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
src/allocation/service_layer Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 1
1
# pylint: disable=unused-argument
2
2
from __future__ import annotations
3
3
from dataclasses import asdict
4
- from typing import TYPE_CHECKING
5
- from allocation .adapters import email , redis_eventpublisher
4
+ from typing import Callable , TYPE_CHECKING
6
5
from allocation .domain import commands , events , model
7
6
from allocation .domain .model import OrderLine
8
7
@@ -65,19 +64,19 @@ def change_batch_quantity(
65
64
66
65
def send_out_of_stock_notification (
67
66
event : events .OutOfStock ,
68
- uow : unit_of_work . AbstractUnitOfWork ,
67
+ send_mail : Callable ,
69
68
):
70
- email . send (
69
+ send_mail (
71
70
72
71
f"Out of stock for { event .sku } " ,
73
72
)
74
73
75
74
76
75
def publish_allocated_event (
77
76
event : events .Allocated ,
78
- uow : unit_of_work . AbstractUnitOfWork ,
77
+ publish : Callable ,
79
78
):
80
- redis_eventpublisher . publish ("line_allocated" , event )
79
+ publish ("line_allocated" , event )
81
80
82
81
83
82
def add_allocation_to_read_model (
You can’t perform that action at this time.
0 commit comments