Skip to content
This repository was archived by the owner on Feb 17, 2026. It is now read-only.

Commit 45e4aab

Browse files
committed
final upload
1 parent d7404c3 commit 45e4aab

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/node_data_upload.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"""
2424

2525
load_dotenv()
26-
data = json.loads(os.getenv('PGDB_TANK'))
26+
data = json.loads(os.getenv('PGDB_LOCAL'))
2727
conn = psycopg2.connect(**data, connect_timeout = 5)
2828
cur = conn.cursor()
2929
args = nh.parse_arguments()
@@ -135,7 +135,7 @@
135135
not_uploaded_files = "data/NODE/failed_uploads"
136136
os.makedirs(not_uploaded_files, exist_ok=True)
137137
not_uploaded_path = os.path.join(not_uploaded_files, os.path.basename(filename))
138-
#os.replace(filename, not_uploaded_path)
138+
os.replace(filename, not_uploaded_path)
139139
print(f"filename {filename} could not be uploaded.")
140140
os.makedirs('data/NODE/upload_logs/failed_uploads/', exist_ok=True)
141141
modified_filename = filename.replace('data/NODE/', 'data/NODE/upload_logs/failed_uploads/')
@@ -151,7 +151,7 @@
151151
logfile.append(f"✗ File upload failed: {e}")
152152
os.makedirs(not_uploaded_files, exist_ok=True)
153153
not_uploaded_path = os.path.join(not_uploaded_files, os.path.basename(filename))
154-
#os.replace(filename, not_uploaded_path)
154+
os.replace(filename, not_uploaded_path)
155155
os.makedirs('data/NODE/upload_logs/failed_uploads/', exist_ok=True)
156156
modified_filename = filename.replace('data/NODE/', 'data/NODE/upload_logs/failed_uploads/')
157157
with open(modified_filename + '.upload.log', 'w', encoding = "utf-8") as writer:

0 commit comments

Comments
 (0)