mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-10 08:38:28 +00:00
Fixed typo in creditcard + fixed bug in ModuleInformation (relative to date).
This commit is contained in:
parent
deeebec2f5
commit
ff6dcaf456
3 changed files with 12 additions and 8 deletions
|
@ -66,7 +66,7 @@ if __name__ == "__main__":
|
|||
publisher.warning('{}Checked {} valid number(s)'.format(
|
||||
to_print, len(creditcard_set)))
|
||||
#Send to duplicate
|
||||
p.populate_set_out(filepath, 'Duplicate')
|
||||
p.populate_set_out(filename, 'Duplicate')
|
||||
#send to Browse_warning_paste
|
||||
p.populate_set_out('creditcard;{}'.format(filename), 'BrowseWarningPaste')
|
||||
else:
|
||||
|
|
|
@ -134,7 +134,7 @@ class Process(object):
|
|||
self.r_temp.hset('queues', self.subscriber_name,
|
||||
int(self.r_temp.scard(in_set)))
|
||||
message = self.r_temp.spop(in_set)
|
||||
timestamp = int(time.mktime(datetime.datetime.utcnow().timetuple()))
|
||||
timestamp = int(time.mktime(datetime.datetime.now().timetuple()))
|
||||
dir_name = os.environ['AIL_HOME']+self.config.get('Directories', 'pastes')
|
||||
|
||||
if message is None:
|
||||
|
@ -142,7 +142,6 @@ class Process(object):
|
|||
|
||||
else:
|
||||
try:
|
||||
#path = message[message.index(dir_name)+len(dir_name):message.index(".gz")]
|
||||
path = message.split(".")[-2].split("/")[-1]
|
||||
value = str(timestamp) + ", " + path
|
||||
self.r_temp.set("MODULE_"+self.subscriber_name, value)
|
||||
|
|
|
@ -29,7 +29,8 @@ if __name__ == "__main__":
|
|||
|
||||
while True:
|
||||
|
||||
table = PrettyTable(['#', 'Queue', 'Amount', 'Paste start time', 'Processing time for current paste (H:M:S)', 'Paste hash'], sortby="Processing time for current paste (H:M:S)", reversesort=True)
|
||||
table1 = PrettyTable(['#', 'Queue', 'Amount', 'Paste start time', 'Processing time for current paste (H:M:S)', 'Paste hash'], sortby="Processing time for current paste (H:M:S)", reversesort=True)
|
||||
table2 = PrettyTable(['#', 'Queue', 'Amount', 'Paste start time', 'Time since idle (H:M:S)', 'Last paste hash'], sortby="Time since idle (H:M:S)", reversesort=True)
|
||||
num = 0
|
||||
for queue, card in server.hgetall("queues").iteritems():
|
||||
key = "MODULE_" + queue
|
||||
|
@ -38,10 +39,14 @@ if __name__ == "__main__":
|
|||
timestamp, path = value.split(", ")
|
||||
if timestamp is not None and path is not None:
|
||||
num += 1
|
||||
startTime_readable = datetime.datetime.utcfromtimestamp(int(timestamp))
|
||||
startTime_readable = datetime.datetime.fromtimestamp(int(timestamp))
|
||||
processed_time_readable = str((datetime.datetime.now() - startTime_readable)).split('.')[0]
|
||||
table.add_row([num, queue, card, startTime_readable, processed_time_readable, path])
|
||||
if int(card) > 0:
|
||||
table1.add_row([num, queue, card, startTime_readable, processed_time_readable, path])
|
||||
else:
|
||||
table2.add_row([num, queue, card, startTime_readable, processed_time_readable, path])
|
||||
|
||||
os.system('clear')
|
||||
print table
|
||||
time.sleep(1)
|
||||
print table1
|
||||
print table2
|
||||
time.sleep(5)
|
||||
|
|
Loading…
Reference in a new issue