Skip to content

Commit

Permalink
Fix scheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Wu Fei authored and Carlos Wu Fei committed Oct 3, 2023
1 parent e22858e commit ac9bad4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/deals/margin.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def retry_repayment(self, query_loan, buy_back_fiat):
symbol=self.active_bot.pair,
amount=total_base_qty,
)
self.retry_repayment(query_loan, buy_back_fiat)
# self.retry_repayment(query_loan, buy_back_fiat)
except Exception as error:
print(error)
self._append_errors(
Expand Down
6 changes: 5 additions & 1 deletion api/market_updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
)

scheduler.start()
atexit.register(lambda: scheduler.shutdown(wait=False))


try:
mu = StreamingController()
Expand All @@ -66,8 +66,12 @@
mu.get_klines()
else:
logging.error(f"Websocket exception: {e}")

atexit.register(lambda: scheduler.shutdown(wait=False))

except Exception as error:
logging.error(f"Streaming controller error: {error}")
mu = StreamingController()
mu.get_klines()

atexit.register(lambda: scheduler.shutdown(wait=False))

0 comments on commit ac9bad4

Please sign in to comment.