Skip to content
This repository has been archived by the owner on Jun 3, 2023. It is now read-only.

removed Queue lib that is not used for twitter.py #30

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion analysis.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-

from google.cloud import language
from os import getenv
from re import compile
from re import IGNORECASE
from requests import get
Expand Down
2 changes: 0 additions & 2 deletions benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# -*- coding: utf-8 -*-

from datetime import datetime
from datetime import timedelta

from analysis import Analysis
from trading import Trading
from twitter import Twitter
Expand Down
5 changes: 2 additions & 3 deletions twitter.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

# -*- coding: utf-8 -*-

from os import getenv
from simplejson import loads
from Queue import Queue
from threading import Event
from threading import Thread
from tweepy import API
Expand Down Expand Up @@ -151,7 +151,6 @@ def __init__(self, callback, logs_to_cloud):
def start_queue(self):
"""Creates a queue and starts the worker threads."""

self.queue = Queue()
self.stop_event = Event()
self.logs.debug("Starting %s worker threads." % NUM_THREADS)
self.workers = []
Expand Down Expand Up @@ -248,4 +247,4 @@ def handle_data(self, logs, data):
logs.info("Examining tweet: %s" % tweet)

# Call the callback.
self.callback(tweet)
self.callback(tweet)