s/push/send_request/g

This commit is contained in:
Fabio Manganiello 2018-01-02 19:33:33 +01:00
parent f2e5ba1eef
commit 4a6accf483
3 changed files with 3 additions and 3 deletions

View file

@ -142,7 +142,7 @@ class Pusher(object):
}) })
def push(self, target, action, backend=None, def send_request(self, target, action, backend=None,
timeout=default_response_wait_timeout, **kwargs): timeout=default_response_wait_timeout, **kwargs):
""" """
Sends a message on a backend and optionally waits for an answer. Sends a message on a backend and optionally waits for an answer.

View file

@ -12,7 +12,7 @@ def main(args=sys.argv[1:]):
print(opts.args) print(opts.args)
pusher.send_event(target=opts.target, type=opts.event, **opts.args) pusher.send_event(target=opts.target, type=opts.event, **opts.args)
else: else:
pusher.push(target=opts.target, action=opts.action, timeout=opts.timeout, **opts.args) pusher.send_request(target=opts.target, action=opts.action, timeout=opts.timeout, **opts.args)
main() main()

View file

@ -52,7 +52,7 @@ class TestLocal(unittest.TestCase):
on_response=self.on_response()) on_response=self.on_response())
logging.info('Sending request') logging.info('Sending request')
pusher.push(target=Config.get('device_id'), action='shell.exec', pusher.send_request(target=Config.get('device_id'), action='shell.exec',
cmd='echo ping', timeout=None) cmd='echo ping', timeout=None)