Force reimport of libs in some python versions
This commit is contained in:
1 parent
d4917c6c35
commit
5b56253dcf
3 files changed
+15
-7
No files matched your search
@@ -19,6 +19,7 @@
|
|||||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
import importlib
|
||||||
import os
|
import os
|
||||||
import requests
|
import requests
|
||||||
import shutil
|
import shutil
|
||||||
@@ -155,6 +156,7 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
import worker
|
import worker
|
||||||
|
importlib.reload(worker)
|
||||||
worker.run_openbench_worker(args)
|
worker.run_openbench_worker(args)
|
||||||
|
|
||||||
except BadVersionException:
|
except BadVersionException:
|
||||||
|
|||||||
+12
-6
@@ -50,7 +50,7 @@ from client import try_forever
|
|||||||
|
|
||||||
## Basic configuration of the Client. These timeouts can be changed at will
|
## Basic configuration of the Client. These timeouts can be changed at will
|
||||||
|
|
||||||
CLIENT_VERSION = 21 # Client version to send to the Server
|
CLIENT_VERSION = 22 # Client version to send to the Server
|
||||||
TIMEOUT_HTTP = 30 # Timeout in seconds for HTTP requests
|
TIMEOUT_HTTP = 30 # Timeout in seconds for HTTP requests
|
||||||
TIMEOUT_ERROR = 10 # Timeout in seconds when any errors are thrown
|
TIMEOUT_ERROR = 10 # Timeout in seconds when any errors are thrown
|
||||||
TIMEOUT_WORKLOAD = 30 # Timeout in seconds between workload requests
|
TIMEOUT_WORKLOAD = 30 # Timeout in seconds between workload requests
|
||||||
@@ -727,6 +727,16 @@ def locate_utility(util, force_exit=True, report_error=True):
|
|||||||
if report_error: print('[Error] Unable to locate %s' % (util))
|
if report_error: print('[Error] Unable to locate %s' % (util))
|
||||||
if force_exit: sys.exit()
|
if force_exit: sys.exit()
|
||||||
|
|
||||||
|
def set_cutechess_permissions():
|
||||||
|
|
||||||
|
status = os.system('sudo -n chmod 777 cutechess-ob > /dev/null 2>&1')
|
||||||
|
|
||||||
|
if status != 0:
|
||||||
|
status = os.system('chmod 777 cutechess-ob > /dev/null 2>&1')
|
||||||
|
|
||||||
|
if status != 0:
|
||||||
|
print ('[ERROR] Unable to set execute permissions on cutechess-ob')
|
||||||
|
|
||||||
|
|
||||||
def cleanup_client():
|
def cleanup_client():
|
||||||
|
|
||||||
@@ -1347,11 +1357,7 @@ def run_openbench_worker(args):
|
|||||||
try_forever(server_configure_worker, [config], setup_error)
|
try_forever(server_configure_worker, [config], setup_error)
|
||||||
|
|
||||||
if IS_LINUX:
|
if IS_LINUX:
|
||||||
|
set_cutechess_permissions()
|
||||||
status = os.system('sudo -n chmod 777 cutechess-ob')
|
|
||||||
|
|
||||||
if status != 0:
|
|
||||||
os.system('chmod 777 cutechess-ob')
|
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"client_version" : 21,
|
"client_version" : 22,
|
||||||
"client_repo_url" : "https://github.com/AndyGrant/OpenBench",
|
"client_repo_url" : "https://github.com/AndyGrant/OpenBench",
|
||||||
"client_repo_ref" : "master",
|
"client_repo_ref" : "master",
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user