mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Switch to using utils.jid to generate jid
This commit is contained in:
parent
11c417b79a
commit
6e8d25f973
@ -4,7 +4,6 @@ A collection of mixins useful for the various *Client interfaces
|
||||
'''
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
import datetime
|
||||
import logging
|
||||
import multiprocessing
|
||||
|
||||
@ -52,6 +51,7 @@ class SyncClientMixin(object):
|
||||
listen=False)
|
||||
event.fire_event(data, tagify('new', base=tag))
|
||||
|
||||
# TODO: document these, and test that they exist
|
||||
# TODO: Other things to inject??
|
||||
func_globals = {'__jid__': jid,
|
||||
'__user__': data['user'],
|
||||
@ -123,7 +123,7 @@ class AsyncClientMixin(object):
|
||||
Execute the function in a multiprocess and return the event tag to use
|
||||
to watch for the return
|
||||
'''
|
||||
jid = '{0:%Y%m%d%H%M%S%f}'.format(datetime.datetime.now())
|
||||
jid = salt.utils.jid.gen_jid()
|
||||
tag = tagify(jid, prefix=self.tag_prefix)
|
||||
|
||||
proc = multiprocessing.Process(
|
||||
|
Loading…
Reference in New Issue
Block a user