Compare commits
5 Commits
0a17d98781
...
master
Author | SHA1 | Date | |
---|---|---|---|
b69d6032b2 | |||
bc9d2493a9 | |||
b0d2c66f09 | |||
77490bae60 | |||
625b7926eb |
@ -18,4 +18,13 @@ try:
|
|||||||
consumer.close()
|
consumer.close()
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
consumer.close()
|
consumer.close()
|
||||||
print(DATETIMES)
|
dt = {}
|
||||||
|
for datetime in DATETIMES:
|
||||||
|
dts = datetime.strftime("%m/%d/%Y, %H:%M:%S")
|
||||||
|
if dts not in dt:
|
||||||
|
dt[dts] = 1
|
||||||
|
else:
|
||||||
|
dt[dts] +=1
|
||||||
|
for key in dt:
|
||||||
|
print(key,",",dt[key])
|
||||||
|
consumer.close()
|
||||||
|
@ -23,5 +23,13 @@ try:
|
|||||||
channel.basic_consume(queue=queue_name, on_message_callback=callback, auto_ack=True)
|
channel.basic_consume(queue=queue_name, on_message_callback=callback, auto_ack=True)
|
||||||
channel.start_consuming()
|
channel.start_consuming()
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
|
dt = {}
|
||||||
|
for datetime in DATETIMES:
|
||||||
|
dts = datetime.strftime("%m/%d/%Y, %H:%M:%S")
|
||||||
|
if dts not in dt:
|
||||||
|
dt[dts] = 1
|
||||||
|
else:
|
||||||
|
dt[dts] +=1
|
||||||
|
for key in dt:
|
||||||
|
print(key,",",dt[key])
|
||||||
connection.close()
|
connection.close()
|
||||||
print(DATETIMES)
|
|
||||||
|
@ -17,5 +17,13 @@ try:
|
|||||||
m = socket.recv_string()
|
m = socket.recv_string()
|
||||||
DATETIMES.append(datetime.now())
|
DATETIMES.append(datetime.now())
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
|
dt = {}
|
||||||
|
for datetime in DATETIMES:
|
||||||
|
dts = datetime.strftime("%m/%d/%Y, %H:%M:%S")
|
||||||
|
if dts not in dt:
|
||||||
|
dt[dts] = 1
|
||||||
|
else:
|
||||||
|
dt[dts] +=1
|
||||||
|
for key in dt:
|
||||||
|
print(key,",",dt[key])
|
||||||
socket.close()
|
socket.close()
|
||||||
print(DATETIMES)
|
|
||||||
|
Reference in New Issue
Block a user