mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
No need to manually do connect_pub, use listen=True in run_job
This commit is contained in:
parent
3ec004bd2e
commit
a416bf0112
1 changed files with 1 additions and 2 deletions
|
@ -36,8 +36,7 @@ log = logging.getLogger(__name__)
|
|||
|
||||
def _ping(tgt, expr_form, timeout, gather_job_timeout):
|
||||
client = salt.client.get_local_client(__opts__['conf_file'])
|
||||
client.event.connect_pub(timeout=timeout)
|
||||
pub_data = client.run_job(tgt, 'test.ping', (), expr_form, '', timeout, '')
|
||||
pub_data = client.run_job(tgt, 'test.ping', (), expr_form, '', timeout, '', listen=True)
|
||||
|
||||
if not pub_data:
|
||||
return pub_data
|
||||
|
|
Loading…
Add table
Reference in a new issue