mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-22 22:21:32 +00:00
Enable proxying of Triggerless messages in TFWServer
This commit is contained in:
parent
cf4a5bc09d
commit
76456b36de
@ -24,11 +24,13 @@ class TFWServer:
|
|||||||
return self._fsm
|
return self._fsm
|
||||||
|
|
||||||
def make_response(self, message):
|
def make_response(self, message):
|
||||||
|
trigger = message.get('trigger', '')
|
||||||
|
try: self.fsm.trigger(trigger, message=message)
|
||||||
|
except AttributeError: log.debug('FSM failed to execute nonexistent trigger: "{}"'.format(trigger))
|
||||||
return message
|
return message
|
||||||
|
|
||||||
def proxy_filter(self, message):
|
def proxy_filter(self, message):
|
||||||
try: return self.fsm.trigger(message['key'], message=message)
|
return True
|
||||||
except AttributeError: return False
|
|
||||||
|
|
||||||
def listen(self, port):
|
def listen(self, port):
|
||||||
self.application.listen(port)
|
self.application.listen(port)
|
||||||
|
Loading…
Reference in New Issue
Block a user