所以可以说我在python中有这个方法
def get_data(notificaition):
print("Notification Recived: ", notificaition)
然后我有另一种方法可以接收事件并获取该事件的值。
def verify_singal_r():
with Session() as session:
connection = Connection("http://example/signalr", session)
print(connection)
logging.info("got the connection")
presenceservice = connection.register_hub('MyHub')
connection.start()
def print_error(error):
print('error: ', error)
connection.error += print_error
# TODO: NEED TO ADD POST REQUEST HERE
presenceservice.client.on('Notified', get_data)
connection.wait(10)
一旦关键字Verify_Signal运行,我就会得到我需要的值并将它们打印到控制台上
如何使用get_data机器人框架中的值?
我试着简单地使用
*** Test Cases ***
Get Event Back
verify_singal_r
get_data
但这不起作用,因为 get_data 需要参数。
料青山看我应如是
缥缈止盈
相关分类