mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 11:16:11 +00:00
Include timestamp into the message generated by the kernel
This commit is contained in:
parent
48764f8eb8
commit
a515f03904
1 changed files with 3 additions and 1 deletions
|
@ -1,7 +1,6 @@
|
||||||
#Common functions shared between aha and aha-worker
|
#Common functions shared between aha and aha-worker
|
||||||
#FIXME Memory leak in process trees -> need to clean up them
|
#FIXME Memory leak in process trees -> need to clean up them
|
||||||
#triggered by the kernel
|
#triggered by the kernel
|
||||||
#TODO loader should include timestamp in the message hash
|
|
||||||
from ctypes import *
|
from ctypes import *
|
||||||
import os,sys,random,datetime,json,time, unittest
|
import os,sys,random,datetime,json,time, unittest
|
||||||
|
|
||||||
|
@ -14,6 +13,9 @@ class AHAActions:
|
||||||
#Can trow IOError
|
#Can trow IOError
|
||||||
def load_file(self,filename):
|
def load_file(self,filename):
|
||||||
msg = {}
|
msg = {}
|
||||||
|
s = os.stat(filename)
|
||||||
|
ts = int(s[os.path.stat.ST_CTIME])
|
||||||
|
msg['timestamp'] = ts
|
||||||
fp = open(filename,'r')
|
fp = open(filename,'r')
|
||||||
for i in fp.read().split('\n'):
|
for i in fp.read().split('\n'):
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue