File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
src/allocation/service_layer Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 11from dataclasses import asdict
2+ from typing import Callable
23
3- from allocation .adapters import email , event_publisher
44from allocation .domain import commands , events , model
55from allocation .service_layer import unit_of_work
66
@@ -76,15 +76,15 @@ def deallocate(
7676
7777
7878def publish_allocated_event (
79- message : events .Allocated , uow : unit_of_work . AbstractUnitOfWork
80- ):
81- event_publisher . publish ("line_allocated" , message )
79+ message : events .Allocated , publish : Callable
80+ ) -> None :
81+ publish ("line_allocated" , message )
8282
8383
8484def send_out_of_stock_notification (
85- message : events .OutOfStock , uow : unit_of_work . AbstractUnitOfWork
86- ):
87- email . send_mail ("stock-admin@made.com" , f"Out of stock: { message .sku } " )
85+ message : events .OutOfStock , send_mail : Callable
86+ ) -> None :
87+ send_mail ("stock-admin@made.com" , f"Out of stock: { message .sku } " )
8888
8989
9090def add_allocation_to_read_model (
You can’t perform that action at this time.
0 commit comments