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 11# pylint: disable=unused-argument
22from __future__ import annotations
33from dataclasses import asdict
4- from typing import TYPE_CHECKING
5- from allocation .adapters import email , redis_eventpublisher
4+ from typing import Callable , TYPE_CHECKING
65from allocation .domain import commands , events , model
76from allocation .domain .model import OrderLine
87
@@ -65,19 +64,19 @@ def change_batch_quantity(
6564
6665def send_out_of_stock_notification (
6766 event : events .OutOfStock ,
68- uow : unit_of_work . AbstractUnitOfWork ,
67+ send_mail : Callable ,
6968):
70- email . send (
69+ send_mail (
7170 "stock@made.com" ,
7271 f"Out of stock for { event .sku } " ,
7372 )
7473
7574
7675def publish_allocated_event (
7776 event : events .Allocated ,
78- uow : unit_of_work . AbstractUnitOfWork ,
77+ publish : Callable ,
7978):
80- redis_eventpublisher . publish ("line_allocated" , event )
79+ publish ("line_allocated" , event )
8180
8281
8382def add_allocation_to_read_model (
You can’t perform that action at this time.
0 commit comments