Skip to content

Commit c7eedfc

Browse files
committed
set url to technetium.nimh.nih.gov for testing
1 parent bf9c19f commit c7eedfc

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
import platform
66

77
CURRENT_OS: str = platform.system()
8-
API_BASE_URL: str = 'http://localhost:5000'
8+
API_BASE_URL: str = 'https://technetium.nimh.nih.gov/compmem'
9+
VERIFY: bool = False
910
RUNNING_FROM_EXECUTABLE: bool = getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS')
1011
# WORKER_ID_PLACEHOLDER_VALUE is the placeholder value assigned to the WorkerID field
1112
# in the executables when we build them. It should be replaced by actual ID when

utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import requests
55
import logging
66
import time
7-
from config import API_BASE_URL, RUNNING_FROM_EXECUTABLE, CURRENT_OS
7+
from config import API_BASE_URL, RUNNING_FROM_EXECUTABLE, CURRENT_OS, VERIFY
88
from hashlib import blake2b
99
from io import BytesIO
1010
from pathlib import Path
@@ -31,7 +31,7 @@ def get_blocks_to_run(worker_id: str) -> list[str] | dict[str, str]:
3131
params = {'worker_id': worker_id}
3232

3333
try:
34-
response = requests.get(url, params=params)
34+
response = requests.get(url, params=params, verify=VERIFY)
3535
response.raise_for_status() # Raise an error for non-2xx status codes
3636
tasks = response.json().get('blocks_to_run', [])
3737
logging.info(f'Tasks to run: {tasks}')
@@ -123,7 +123,7 @@ def upload_block(worker_id: str, block_name: str, data_directory: str, slog_file
123123
data = {'block_name': block_name, 'checksum': checksum}
124124
files = {'file': (zip_file_name_with_timestamp, zip_buffer, 'application/zip')}
125125

126-
response = requests.post(url, params=params, data=data, files=files)
126+
response = requests.post(url, params=params, data=data, files=files, verify=VERIFY)
127127
logging.info(f"Response Status Code: {response.status_code}")
128128

129129
if response.status_code == 200:

0 commit comments

Comments
 (0)