s/push/send_request/g
This commit is contained in:
parent
f2e5ba1eef
commit
4a6accf483
3 changed files with 3 additions and 3 deletions
|
@ -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):
|
||||
"""
|
||||
Sends a message on a backend and optionally waits for an answer.
|
||||
|
|
|
@ -12,7 +12,7 @@ def main(args=sys.argv[1:]):
|
|||
print(opts.args)
|
||||
pusher.send_event(target=opts.target, type=opts.event, **opts.args)
|
||||
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()
|
||||
|
|
|
@ -52,7 +52,7 @@ class TestLocal(unittest.TestCase):
|
|||
on_response=self.on_response())
|
||||
|
||||
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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue