-
Notifications
You must be signed in to change notification settings - Fork 20
billing dispatcher to handle credit cutoff #1214
billing dispatcher to handle credit cutoff #1214
Conversation
…nsufficient-credits' into feature/issue-1214-billing-dispatcher-to-handle-credit-cutoff
…handle-credit-cutoff
Ready for review. |
@@ -251,8 +261,10 @@ def process_outbound(self, config, msg, connector_name): | |||
log.info( | |||
"Not billing for outbound message: %r" % msg.to_json()) | |||
else: | |||
yield self.create_transaction_for_outbound(msg) | |||
transaction = yield self.create_transaction_for_outbound(msg) | |||
msg_mdh.set_paid() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we only call msg.set_paid()
if transaction is not None
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
transaction
is probably a bad name for the result because the transaction data is not only one part of the result?
Left a few comments but this turned out a lot cleaner than I feared it might. Woot! |
session_event='new' | ||
) | ||
|
||
published_msg = self.ri_helper.get_dispatched_inbound()[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be self.ro_helper.get...
(and the same for the other inbound test)`
Ready for re-review |
I've realised that we should send back |
|
||
self.assertEqual(len(self.ri_helper.get_dispatched_outbound()), 0) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too many blank lines?
👍 once the extra blank line is removed. Let's leave the |
#1219 created for sending back |
👍 |
…patcher-to-handle-credit-cutoff billing dispatcher to handle credit cutoff
The billing dispatcher should handle the the parameter set in #1210 appropriately.