mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
Add iso timestamp to all events, fix #7043
This commit is contained in:
parent
50b6ba4c03
commit
babaef6bd4
@ -47,13 +47,13 @@ Namspaced tag
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
# Import python libs
|
# Import python libs
|
||||||
import time
|
|
||||||
import os
|
import os
|
||||||
import fnmatch
|
import fnmatch
|
||||||
import glob
|
import glob
|
||||||
import hashlib
|
import hashlib
|
||||||
import errno
|
import errno
|
||||||
import logging
|
import logging
|
||||||
|
import datetime
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
from multiprocessing import Process
|
from multiprocessing import Process
|
||||||
from collections import MutableMapping
|
from collections import MutableMapping
|
||||||
@ -264,7 +264,9 @@ class SaltEvent(object):
|
|||||||
if not self.cpush:
|
if not self.cpush:
|
||||||
self.connect_pull()
|
self.connect_pull()
|
||||||
|
|
||||||
tagend = ""
|
data['__stamp__'] = datetime.datetime.now().isoformat('_')
|
||||||
|
|
||||||
|
tagend = ''
|
||||||
if len(tag) <= 20: # old style compatible tag
|
if len(tag) <= 20: # old style compatible tag
|
||||||
tag = '{0:|<20}'.format(tag) # pad with pipes '|' to 20 character length
|
tag = '{0:|<20}'.format(tag) # pad with pipes '|' to 20 character length
|
||||||
else: # new style longer than 20 chars
|
else: # new style longer than 20 chars
|
||||||
|
Loading…
Reference in New Issue
Block a user