def run(self): threadCount = 10 budgetPerThread = self.budget / threadCount stockQueue = Queue() for stock in iex.getAllTickers(): stockQueue.put(stock) threads = [] for i in range(threadCount): t = threading.Thread(target=BetaTrades.quick_trade_one, args=[budgetPerThread, stockQueue]) # t = threading.Thread(target=callme, args=[i]) threads.append(t) t.start() Logger.trace('thread count is ') Logger.trace(threading.activeCount())
try: pydevd_pycharm.settrace('localhost', port=debuggerPort, stdoutToServer=True, stderrToServer=True) except Exception: print( "Must turn debugger on at port {}. See https://www.jetbrains.com/help/idea/remote-debugging-with-product.html#remote-debug-config" .format(debuggerPort)) sys.exit() # initialize.PyfyApp().run() print("does this run now?") if args.symbol: symbol = args.symbol Logger.trace("Symbol passed in: {}".format(args.symbol)) quote = iex.getQuote(symbol) Logger.trace("Queried Symbol Quote is ...") Logger.trace(quote) if (quote != None): Logger.info('Current Price: {}'.format(quote.get('latestPrice'))) Logger.info('PE Ratio: {}'.format(quote.get('peRatio'))) Logger.info('52-Week High: {}'.format(quote.get('week52High'))) Logger.info('52-Week Low: {}'.format(quote.get('week52Low'))) else: Logger.error( 'Could not print symbol information for {}'.format(symbol)) if args.price_dates: parsedDate = dateparser.parse(args.graphprice) if (parsedDate.weekday() < 5):