Skip to content
This repository has been archived by the owner on Jul 21, 2022. It is now read-only.

Addressing the multiprocessing issue on Windows, this involves ensuri… #198

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion bin/conductor
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ try:
except:
sys.path.append(os.path.dirname(os.path.dirname(__file__)))

# On Windows, due to the quirks of the multiprocessing module
# this file is installed as 'conductor.py' and to ensure the
# environment gets passed properly, add the module to the path
# list again
if os.name == 'nt':
sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))

import conductor
from conductor.lib import conductor_submit, downloader, downloader2, uploader, uploader_v2, loggeria

Expand Down Expand Up @@ -447,7 +454,8 @@ def run_downloader(args):
# Code switcher between new downloader and old downloader
# HARD set windows users to old downloader
if sys.platform == "win32":
return downloader2.run_downloader(args_dict)
return downloader.run_downloader(args_dict)
# return downloader2.run_downloader(args_dict)
if args_dict.get("task_id") and not args_dict.get("job_id"):
raise argparse.ArgumentTypeError('Must supply a job_id with task_id.')

Expand Down
2 changes: 2 additions & 0 deletions installers/windows/ConductorClient.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ ${INSTALL_TYPE}
SetOverwrite ifnewer
SetOutPath "$INSTDIR"
File /r /x ".git" "Conductor"
File /oname=Conductor\bin\conductor.py "Conductor\bin\conductor"
Delete "Conductor\bin\conductor"

${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$INSTDIR\Conductor"
${EnvVarUpdate} $0 "PYTHONPATH" "A" "HKLM" "$INSTDIR\Conductor"
Expand Down
4 changes: 2 additions & 2 deletions installers/windows/conductor.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@echo off
"%~dp0\python\python.exe" "%~dp0\bin\conductor" %*
@echo off
"%~dp0\python\python.exe" "%~dp0\bin\conductor.py" %*