Skip to content

Commit d7f1817

Browse files
committed
handle_command no longer returns
1 parent 6e1e9cf commit d7f1817

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎src/allocation/entrypoints/flask_app.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def allocate_endpoint():
3131
request.json['orderid'], request.json['sku'], request.json['qty'],
3232
)
3333
uow = unit_of_work.SqlAlchemyUnitOfWork()
34-
batchref = messagebus.handle(cmd, uow)
34+
messagebus.handle(cmd, uow)
3535
except InvalidSku as e:
3636
return jsonify({'message': str(e)}), 400
3737

‎src/allocation/service_layer/messagebus.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def handle(message: Message, uow: unit_of_work.AbstractUnitOfWork):
1717
if isinstance(message, events.Event):
1818
handle_event(message, uow)
1919
elif isinstance(message, commands.Command):
20-
return handle_command(message, uow)
20+
handle_command(message, uow)
2121
else:
2222
raise Exception(f'{message} was not an Event or Command')
2323

@@ -36,7 +36,7 @@ def handle_command(command, uow: unit_of_work.AbstractUnitOfWork):
3636
logger.debug('handling command %s', command)
3737
try:
3838
handler = COMMAND_HANDLERS[type(command)]
39-
return handler(command, uow=uow)
39+
handler(command, uow=uow)
4040
except Exception:
4141
logger.exception('Exception handling command %s', command)
4242
raise

0 commit comments

Comments
 (0)