Skip to content

Commit

Permalink
Merge branch 'master' into jw-docker-example
Browse files Browse the repository at this point in the history
  • Loading branch information
justinpolygon authored Feb 1, 2024
2 parents efea1e2 + e44ff30 commit b0e5b2c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class ApiCallHandler:
def __init__(self):
self.api_call_queue = asyncio.Queue()
self.executor = ThreadPoolExecutor() # Thread pool for running synchronous code
self.client = RESTClient() # Assumes POLYGON_API_KEY is set in the environment

async def enqueue_api_call(self, options_ticker):
await self.api_call_queue.put(options_ticker)
Expand All @@ -33,8 +34,7 @@ async def start_processing_api_calls(self):
self.api_call_queue.task_done()

def get_options_contract(self, options_ticker):
client = RESTClient() # Assumes POLYGON_API_KEY is set in the environment
return client.get_options_contract(options_ticker)
return self.client.get_options_contract(options_ticker)


class MessageHandler:
Expand Down

0 comments on commit b0e5b2c

Please sign in to comment.