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
2ac70cfab5
commit
ef749abfc6
1 changed files with 1 additions and 2 deletions
|
@ -37,8 +37,7 @@ log = logging.getLogger(__name__)
|
|||
|
||||
def _ping(tgt, tgt_type, 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', (), tgt_type, '', timeout, '')
|
||||
pub_data = client.run_job(tgt, 'test.ping', (), tgt_type, '', timeout, '', listen=True)
|
||||
|
||||
if not pub_data:
|
||||
return pub_data
|
||||
|
|
Loading…
Add table
Reference in a new issue