fix misplaced lock
This commit is contained in:
parent
5246d69063
commit
9141f4109e
|
|
@ -1,6 +1,7 @@
|
||||||
2026.06.04:
|
2026.06.04:
|
||||||
. Proper tp_mode 2 fix
|
. Proper tp_mode 2 fix
|
||||||
. Minor fixes to string handling.
|
. Minor fixes to string handling.
|
||||||
|
. Fix misplaced lock
|
||||||
|
|
||||||
2026.06.03:
|
2026.06.03:
|
||||||
. Fixed tp mode 2 non-functional
|
. Fixed tp mode 2 non-functional
|
||||||
|
|
|
||||||
9
main.py
9
main.py
|
|
@ -262,7 +262,7 @@ def restart_pair_no_json(base: str, quote: str) -> int:
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
broker.logger.log_this(f"Error canceling old take profit order: {e}",2,symbol)
|
broker.logger.log_this(f"Error canceling old take profit order: {e}",2,symbol)
|
||||||
|
|
||||||
broker.logger.log_this(f"Cancelling old take safety orders",2,symbol)
|
broker.logger.log_this(f"Cancelling old safety orders",2,symbol)
|
||||||
for item in instance.status.get_safety_orders():
|
for item in instance.status.get_safety_orders():
|
||||||
try:
|
try:
|
||||||
broker.cancel_order(item["id"],item["symbol"])
|
broker.cancel_order(item["id"],item["symbol"])
|
||||||
|
|
@ -273,9 +273,10 @@ def restart_pair_no_json(base: str, quote: str) -> int:
|
||||||
running_traders.remove(instance)
|
running_traders.remove(instance)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
broker.logger.log_this(f"Instance {instance.status.get_pair()} not found in running_traders.",1,instance.status.get_pair())
|
broker.logger.log_this(f"Instance {instance.status.get_pair()} not found in running_traders.",1,instance.status.get_pair())
|
||||||
add_instance(base,quote)
|
else:
|
||||||
return 0
|
return 1
|
||||||
return 1
|
add_instance(base,quote)
|
||||||
|
return 0
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
broker.logger.log_this(f"Exception in restart_pair_no_json: {e}",1,symbol)
|
broker.logger.log_this(f"Exception in restart_pair_no_json: {e}",1,symbol)
|
||||||
return 1
|
return 1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue