Compare commits

..

2 Commits

Author SHA1 Message Date
77490bae60 print results 2021-04-25 13:03:26 +02:00
625b7926eb better processing 2021-04-25 13:02:15 +02:00
3 changed files with 27 additions and 3 deletions

View File

@ -18,4 +18,12 @@ try:
consumer.close()
except KeyboardInterrupt:
consumer.close()
print(DATETIMES)
dt = {}
for datetime in DATETIMES:
dts = datetime.strftime("%m/%d/%Y, %H:%M:%S")
if dts not in dt:
dt[strftime("%m/%d/%Y, %H:%M:%S")] = 1
else:
dt[strftime("%m/%d/%Y, %H:%M:%S")] +=1
for key, value in dt:
print(key,",",value)

View File

@ -24,4 +24,12 @@ try:
channel.start_consuming()
except KeyboardInterrupt:
connection.close()
print(DATETIMES)
dt = {}
for datetime in DATETIMES:
dts = datetime.strftime("%m/%d/%Y, %H:%M:%S")
if dts not in dt:
dt[strftime("%m/%d/%Y, %H:%M:%S")] = 1
else:
dt[strftime("%m/%d/%Y, %H:%M:%S")] +=1
for key, value in dt:
print(key,",",value)

View File

@ -18,4 +18,12 @@ try:
DATETIMES.append(datetime.now())
except KeyboardInterrupt:
socket.close()
print(DATETIMES)
dt = {}
for datetime in DATETIMES:
dts = datetime.strftime("%m/%d/%Y, %H:%M:%S")
if dts not in dt:
dt[strftime("%m/%d/%Y, %H:%M:%S")] = 1
else:
dt[strftime("%m/%d/%Y, %H:%M:%S")] +=1
for key, value in dt:
print(key,",",value)