Beispiel #1
0
 def all_unknown(self, message, *args, **kwargs):
     __callstack_var_tx__ = Transaction(name=self._transactionName)
     yield self.once.begin(self._transactionName)
     try:
         yield self.all.unknown(message, *args, **kwargs)
         yield __callstack_var_tx__.commit()
     except TransactionException:
         yield __callstack_var_tx__.rollback()
Beispiel #2
0
 def any_unknown(self, message, *args, **kwargs):
     __callstack_var_tx__ = Transaction(name=self._transactionName)
     yield self.once.begin(name=self._transactionName)
     try:
         try:            
             response = yield self.any.unknown(message, *args, **kwargs)
         except NoneOfTheObserversRespond:
             raise DeclineMessage
         yield __callstack_var_tx__.commit()
         raise StopIteration(response)
     except TransactionException:
         yield __callstack_var_tx__.rollback()