mirror of
https://github.com/avatao-content/test-tutorial-framework
synced 2025-07-07 07:06:23 +00:00
Include PipeIO dependencies
This commit is contained in:
@ -6,14 +6,67 @@ from tornado.ioloop import IOLoop
|
||||
from tfw.event_handlers import EventHandlerBase
|
||||
from tfw.components import PipeIOEventHandler
|
||||
|
||||
from pipe_io_auxlib import (
|
||||
SignMessagePipeIOEventHandler, VerifyMessagePipeIOEventHandler,
|
||||
BotPipeIOEventHandler,
|
||||
DeployPipeIOEventHandler, IdePipeIOEventHandler,
|
||||
FSMPipeIOEventHandler
|
||||
)
|
||||
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
pipe_io = PipeIOEventHandler(
|
||||
"""
|
||||
Creates general purpose pipes.
|
||||
The first parameter associates the receiving pipe with a key, which is
|
||||
an empty string in this case. It has a special meaning, you can
|
||||
subscribe to every kind of message with this key.
|
||||
If you wish to filter incoming data, specify a single or more keys in
|
||||
a list, eg.: processmanager, ide, key...
|
||||
You can send/receive JSON messages to/from the TFW server as any user,
|
||||
because we gave read+write permissions, without that parameter, only
|
||||
the owner has access to the pipes.
|
||||
"""
|
||||
json_pipe = PipeIOEventHandler(
|
||||
'',
|
||||
'/tmp/tfw_send',
|
||||
'/tmp/tfw_recv'
|
||||
'/tmp/tfw_json_send',
|
||||
'/tmp/tfw_json_recv',
|
||||
permissions=0o666
|
||||
)
|
||||
|
||||
sign_pipe = SignMessagePipeIOEventHandler(
|
||||
'/tmp/tfw_sign_send',
|
||||
'/tmp/tfw_sign_recv',
|
||||
forwarding=True
|
||||
)
|
||||
|
||||
verify_pipe = VerifyMessagePipeIOEventHandler(
|
||||
'/tmp/tfw_verify_send',
|
||||
'/tmp/tfw_verify_recv'
|
||||
)
|
||||
|
||||
bot_pipe = BotPipeIOEventHandler(
|
||||
'/tmp/tfw_bot_send',
|
||||
'/tmp/tfw_bot_recv'
|
||||
)
|
||||
|
||||
deploy_pipe = DeployPipeIOEventHandler(
|
||||
'/tmp/tfw_deploy_send',
|
||||
'/tmp/tfw_deploy_recv',
|
||||
'webservice'
|
||||
)
|
||||
|
||||
ide_pipe = IdePipeIOEventHandler(
|
||||
'/tmp/tfw_ide_send',
|
||||
'/tmp/tfw_ide_recv',
|
||||
'user_ops.py',
|
||||
selected=True
|
||||
)
|
||||
|
||||
fsm_pipe = FSMPipeIOEventHandler(
|
||||
'/tmp/tfw_fsm_send',
|
||||
'/tmp/tfw_fsm_recv'
|
||||
)
|
||||
|
||||
event_handlers = EventHandlerBase.get_local_instances()
|
||||
|
Reference in New Issue
Block a user