File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -477,9 +477,9 @@ def ProcessOrphan(**kwargs):
477477
478478 otLock = JRRsupport .Locker ("OliverTwist" ,ID = osh ['lID' ])
479479 Memory = JRRsupport .Locker (osh ['IDX' ],ID = osh ['mID' ])
480- otLock .Lock ()
481- Memory .Put (OliverTwistTimeout ,State )
482- otLock .Unlock ()
480+ if otLock .Lock ()== 'locked' :
481+ Memory .Put (OliverTwistTimeout ,State )
482+ otLock .Unlock ()
483483
484484# Process the individual index and handle all multi process functionality
485485# OrphanList=ReadStorehouse(idx=idx)
@@ -493,9 +493,11 @@ def ProcessChild(idx):
493493 global OrphanMemory
494494 global JRLog
495495
496- # Get result from Locker
496+ # We don't have the lock, we don't continue
497+
498+ if OliverTwistLock .Lock ()!= 'locked' :
499+ return
497500
498- OliverTwistLock .Lock ()
499501 if idx in OrphanMemory :
500502 sData = json .loads (OrphanMemory [idx ].Get ())
501503 else :
@@ -512,7 +514,10 @@ def ProcessChild(idx):
512514 if status != 'running' :
513515 status = 'waiting'
514516
515- OliverTwistLock .Lock ()
517+ # We don't have the lock, we don't continue
518+
519+ if OliverTwistLock .Lock ()!= 'locked' :
520+ return
516521
517522 # Only run if not already running. It is possible for this state to
518523 # occur, especially if there are only a few orders to process or a
Original file line number Diff line number Diff line change 55oandapyV20
66plotly
77matplotlib
8-
8+ kaleido
You can’t perform that action at this time.
0 commit comments