mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +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 time
|
||||
import os
|
||||
import fnmatch
|
||||
import glob
|
||||
import hashlib
|
||||
import errno
|
||||
import logging
|
||||
import datetime
|
||||
import multiprocessing
|
||||
from multiprocessing import Process
|
||||
from collections import MutableMapping
|
||||
@ -264,7 +264,9 @@ class SaltEvent(object):
|
||||
if not self.cpush:
|
||||
self.connect_pull()
|
||||
|
||||
tagend = ""
|
||||
data['__stamp__'] = datetime.datetime.now().isoformat('_')
|
||||
|
||||
tagend = ''
|
||||
if len(tag) <= 20: # old style compatible tag
|
||||
tag = '{0:|<20}'.format(tag) # pad with pipes '|' to 20 character length
|
||||
else: # new style longer than 20 chars
|
||||
|
Loading…
Reference in New Issue
Block a user