Skip to content

Commit e702b57

Browse files
committed
Bug fixes
Changes to be committed: modified: Base/JackrabbitOliverTwist modified: requirements.txt
1 parent a28bee0 commit e702b57

2 files changed

Lines changed: 12 additions & 7 deletions

File tree

Base/JackrabbitOliverTwist

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff 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

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ ccxt
55
oandapyV20
66
plotly
77
matplotlib
8-
8+
kaleido

0 commit comments

Comments
 (0)