kopia lustrzana https://github.com/OpenDroneMap/WebODM
Try multiple node-odm hostnames
rodzic
54ee8f898d
commit
92b2a02ce7
|
@ -0,0 +1,21 @@
|
|||
import os
|
||||
from django.core.management.base import BaseCommand
|
||||
import socket
|
||||
|
||||
class Command(BaseCommand):
|
||||
requires_system_checks = []
|
||||
|
||||
def add_arguments(self, parser):
|
||||
parser.add_argument("host", type=str)
|
||||
|
||||
super(Command, self).add_arguments(parser)
|
||||
|
||||
def handle(self, **options):
|
||||
host = options.get('host')
|
||||
try:
|
||||
socket.gethostbyname(host)
|
||||
print(host)
|
||||
except:
|
||||
# Try replacing _ with "-"
|
||||
host = host.replace("_", "-")
|
||||
print(host)
|
|
@ -37,13 +37,14 @@ pip-autoremove==0.9.0
|
|||
psycopg2==2.8.6
|
||||
psycopg2-binary==2.8.6
|
||||
PyJWT==1.5.3
|
||||
pyodm==1.5.6
|
||||
pyodm==1.5.8
|
||||
requests==2.26.0
|
||||
urllib3==1.26.7
|
||||
pyparsing==2.4.7
|
||||
pytz==2020.1
|
||||
rcssmin==1.0.6
|
||||
redis==3.2.0
|
||||
requests-toolbelt==0.9.1
|
||||
requests==2.21.0
|
||||
rfc3987==1.3.7
|
||||
rjsmin==1.0.12
|
||||
simplejson==3.10.0
|
||||
|
|
3
start.sh
3
start.sh
|
@ -65,7 +65,8 @@ if [[ "$WO_DEFAULT_NODES" > 0 ]]; then
|
|||
while [ $i -ne "$WO_DEFAULT_NODES" ]
|
||||
do
|
||||
i=$(($i+1))
|
||||
python manage.py addnode webodm_node-odm_$i 3000 --label node-odm-$i
|
||||
NODE_HOST=$(python manage.py getnodehostname webodm_node-odm_$i)
|
||||
python manage.py addnode $NODE_HOST 3000 --label node-odm-$i
|
||||
done
|
||||
fi
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue