[10.10.20] Testing

This commit is contained in:
andrewso 2020-10-10 22:12:44 +01:00
parent 886470d17e
commit 2a06d431b2

View File

@ -82,6 +82,8 @@ class Listener(StreamListener):
def on_data(self, data):
log("Received Tweet...")
if (time() - self.start_time) < self.limit:
data = json.loads(data)
@ -154,6 +156,7 @@ def timeFunction():
return timeF
def createHourJob():
log("Creating hour job...", 'INFO')
schedule.clear("sendToArtemis")
ovPos, ovNeu, ovNeg, ovCompound = 0, 0, 0, 0
@ -181,6 +184,8 @@ def createHourJob():
schedule.every().hour.at(timeF).do(createHourJob).tag("sendToArtemis")
log("Collection will run again at {} every hour".format(time), 'INFO')
def collectorMain(hashtag):
log("Starting Tweet Collector", 'INFO')