Skip to content

Commit 3f53d51

Browse files
committed
**IMPORTANT**: Read BEFORE update.
**Virtual environment now REQUIRED!** Please be sure to read the wiki on setting up the new virtual environment. All scripts now use the new virtual environment. Bug fixes and performance improvements to Locker (distrubuted lock manager). Changes to be committed: modified: Base/JackrabbitLocker modified: Base/JackrabbitOliverTwist modified: Base/JackrabbitRelay modified: Base/Library/JRRmimic.py modified: Base/Library/JackrabbitProxy.py modified: Base/Library/JackrabbitRelay.py modified: StartJackrabbit modified: UpdatePlaceOrder modified: install
1 parent b6d28db commit 3f53d51

9 files changed

+35
-8
lines changed

Base/JackrabbitLocker

+6-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import json
2828

2929
import JRRsupport
3030

31-
Version="0.0.0.1.1020"
31+
Version="0.0.0.1.1050"
3232
BaseDirectory='/home/JackrabbitRelay2/Base'
3333
ConfigDirectory='/home/JackrabbitRelay2/Config'
3434
LogDirectory="/home/JackrabbitRelay2/Logs"
@@ -203,6 +203,9 @@ def main():
203203
dataStore={}
204204
port=37373
205205

206+
if len(sys.argv)>1:
207+
port=int(sys.argv[1])
208+
206209
WritePID(port)
207210

208211
# Open the port.
@@ -212,7 +215,7 @@ def main():
212215
lockerSocket.setblocking(0)
213216
lockerSocket.bind(('', port))
214217
lockerSocket.listen(1024)
215-
except OSError as err:
218+
except Exception as err:
216219
x=str(err)
217220
if x.find('Address already in use')>-1:
218221
x='Another program is using this port: '+str(port)
@@ -288,7 +291,7 @@ def main():
288291
if now>Locker[k]['Expire']:
289292
Locker.pop(k,None)
290293
# for testing memory leaks (Python 3.10)
291-
#gc.collect()
294+
gc.collect()
292295

293296
if __name__ == '__main__':
294297
main()

Base/JackrabbitOliverTwist

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ import subprocess
6767
import JRRsupport
6868
import JackrabbitRelay as JRR
6969

70-
Version="0.0.0.1.1020"
70+
Version="0.0.0.1.1050"
7171
BaseDirectory='/home/JackrabbitRelay2/Base'
7272
DataDirectory='/home/JackrabbitRelay2/Data'
7373
ConfigDirectory='/home/JackrabbitRelay2/Config'

Base/JackrabbitRelay

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import json
1616

1717
import JRRsupport
1818

19-
Version="0.0.0.1.1020"
19+
Version="0.0.0.1.1050"
2020
BaseDirectory='/home/JackrabbitRelay2/Base'
2121
ConfigDirectory='/home/JackrabbitRelay2/Config'
2222
LogDirectory="/home/JackrabbitRelay2/Logs"

Base/Library/JRRmimic.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class mimic:
4848
# released at exit.
4949

5050
def __init__(self,Exchange,Config,Active,DataDirectory=None):
51-
self.Version="0.0.0.1.1020"
51+
self.Version="0.0.0.1.1050"
5252

5353
self.StableCoinUSD=['USDT','USDC','BUSD','UST','DAI','FRAX','TUSD', \
5454
'USDP','LUSD','USDN','HUSD','FEI','TRIBE','RSR','OUSD','XSGD', \

Base/Library/JackrabbitProxy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
class JackrabbitProxy:
5151
def __init__(self,framework=None,payload=None,exchange=None,account=None,asset=None,Usage=None):
5252
# All the default locations
53-
self.Version="0.0.0.1.1020"
53+
self.Version="0.0.0.1.1050"
5454
self.BaseDirectory='/home/JackrabbitRelay2/Base'
5555
self.ConfigDirectory='/home/JackrabbitRelay2/Config'
5656
self.DataDirectory="/home/JackrabbitRelay2/Data"

Base/Library/JackrabbitRelay.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def Success(self,f,s):
110110
class JackrabbitRelay:
111111
def __init__(self,framework=None,payload=None,exchange=None,account=None,asset=None,secondary=None,NoIdentityVerification=False,Usage=None,RaiseError=False):
112112
# All the default locations
113-
self.Version="0.0.0.1.1020"
113+
self.Version="0.0.0.1.1050"
114114
self.NOhtml='<html><title>NO!</title><body style="background-color:#ffff00;display:flex;weight:100vw;height:100vh;align-items:center;justify-content:center"><h1 style="color:#ff0000;font-weight:1000;font-size:10rem">NO!</h1></body></html>'
115115
self.Directories={}
116116
self.Directories['Base']='/home/JackrabbitRelay2/Base'

StartJackrabbit

+7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
44

55
BaseDir="/home/JackrabbitRelay2/Base"
66

7+
# Make sure the virtual environment is active
8+
9+
if [ -d "/home/RAPMD" ] ; then
10+
source /home/RAPMD/bin/activate
11+
fi
12+
713
cd $BaseDir
814

915
Port=$1
@@ -37,3 +43,4 @@ sleep 3
3743
sleep 3
3844
( $BaseDir/LauncherRelay $Port & ) > /dev/null 2>&1
3945

46+
deactivate

UpdatePlaceOrder

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
# Crontab entry ( without has mark #
44
# @reboot ( /home/JackrabbitRelay/Base/RelayLauncher & ) > /dev/null 2>&1
55

6+
# Make sure virtual environment is active
7+
8+
if [ -d "/home/RAPMD" ] ; then
9+
source /home/RAPMD/bin/activate
10+
fi
11+
612
BaseDir="/home/JackrabbitRelay2/Base"
713
GitHubBase="/home/GitHub/JackrabbitRelay/Base"
814

@@ -45,3 +51,5 @@ if [ "x$1" != "x" ] ; then
4551
shift
4652
done
4753
fi
54+
55+
deactivate

install

+9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
#!/bin/bash
2+
3+
# Make sure virtual environment is active
4+
5+
if [ -d "/home/RAPMD" ] ; then
6+
source /home/RAPMD/bin/activate
7+
fi
8+
29
pip3=`which pip3`
310
if [ "x$pip3" == "x" ] ; then
411
echo PIP3 not installed. Please install it first, then re-run this script.
@@ -51,3 +58,5 @@ if [ "$NFS" != "$OFS" ] ; then
5158
echo Running update again...
5259
/home/GitHub/JackrabbitRelay/install nopull
5360
fi
61+
62+
deactivate

0 commit comments

Comments
 (0)