aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Liodden <eriklio@stud.ntnu.no>2017-12-12 10:35:36 +0100
committerErik Liodden <eriklio@stud.ntnu.no>2017-12-12 10:35:36 +0100
commit3eb530e478dd27b1250023fa78ba5f34b6a695ce (patch)
tree82d5aafca99a4b5f8d4288381c82f8b9db460087
parent237af99bf9182c2a6f252a591545067fbc85c448 (diff)
downloadsaitama-3eb530e478dd27b1250023fa78ba5f34b6a695ce.tar.gz
comment out some prints
these are mostly used for debugging purposes and is unnecessary in general.
-rw-r--r--timeEventQueuer.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/timeEventQueuer.py b/timeEventQueuer.py
index 99af94b..9b86f35 100644
--- a/timeEventQueuer.py
+++ b/timeEventQueuer.py
@@ -36,20 +36,22 @@ class Time_event_queuer(threading.Thread,subscriber):
#Executes the event on top of heap. Must be popped
def execute_event(self):
e = heapq.heappop(self.heap)
+ # print("topic: ", e[1].get_topic())
if(isinstance(e[1],event)):
new_event = e[1]
if(new_event.get_topic() == EVENTID_REPEATING):
repeating_event = new_event.get_data()
self.eb.post(repeating_event.get_event())
- print("POSTING NEW TIME EVEEENT")
+ # print("POSTING NEW TIME EVEEENT")
repeating_event.queue()
else:
+ # print(e[1].get_topic())
self.eb.post(e[1])
#Listens on the bus
def process(self,new_event):
- print(new_event.get_topic())
+ # print(new_event.get_topic())
if not isinstance(new_event,event):
print("Invalid event type passed")
return
@@ -142,7 +144,7 @@ class Time_event_queuer(threading.Thread,subscriber):
@staticmethod
def post_time_event(eb,data,delta_time):
event_time = datetime.now() + delta_time #ms removed
- print("EVENT scheduled at {}".format(event_time))
+ # print("EVENT scheduled at {}".format(event_time))
data = (event_time,data)
eb.post(event(EVENTID_TIME,data))
@@ -172,7 +174,7 @@ class Repeating_event_object():
print("RepeatingEvent Finished")
return
self.n-=1
- print("Posting REPEATING event")
+ # print("Posting REPEATING event")
now = datetime.now()
while(now > self.occurence_time):
self.occurence_time += self.repeat_time