diff --git a/kafka/consumer.py b/kafka/consumer.py index 9dc0db7..e589c23 100644 --- a/kafka/consumer.py +++ b/kafka/consumer.py @@ -18,4 +18,10 @@ 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 diff --git a/rabbit/consumer.py b/rabbit/consumer.py index e6cffef..fb0c61a 100644 --- a/rabbit/consumer.py +++ b/rabbit/consumer.py @@ -24,4 +24,10 @@ 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 diff --git a/zmq/consumer.py b/zmq/consumer.py index d3b9cb3..6a18d68 100644 --- a/zmq/consumer.py +++ b/zmq/consumer.py @@ -18,4 +18,10 @@ 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