Skip to content

Commit 1f192d7

Browse files
committed
using serial delocalization, persist logs
1 parent d726dcf commit 1f192d7

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

ingest/expression_writer.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
--cluster-name 'Sparse Example' --render-expression-arrays
2323
"""
2424
from __future__ import annotations
25+
2526
import os
26-
import subprocess
2727
import re
2828
import multiprocessing
2929
import sys
@@ -259,10 +259,15 @@ def delocalize_outputs(self, cluster_name):
259259
:param cluster_name: (str) encoded name of cluster
260260
"""
261261
if self.bucket is not None:
262-
bucket_path = f"{self.bucket}/{self.DELOCALIZE_FOLDER}/{cluster_name}"
262+
bucket_path = f"{self.DELOCALIZE_FOLDER}/{cluster_name}"
263263
self.dev_logger.info(f" pushing all output files to {bucket_path}")
264-
subprocess.Popen(
265-
["gsutil", "-h" , "Content-Encoding:gzip", "-m", "cp", f"{cluster_name}/*.json.gz", f"{bucket_path}"]
266-
)
264+
dir_files = os.listdir(cluster_name)
265+
files_to_push = list(file for file in dir_files if 'gene_entries' not in file)
266+
for file in files_to_push:
267+
local_path = f"{cluster_name}/{file}"
268+
IngestFiles.delocalize_file(None, None, self.matrix_file_path, local_path, f"{bucket_path}/{file}")
267269
self.dev_logger.info(" push completed")
270+
handler = self.dev_logger.handlers[0]
271+
log_filename = handler.baseFilename.split("/").pop()
272+
IngestFiles.delocalize_file(None, None, self.matrix_file_path, log_filename, f"parse_logs/{log_filename}")
268273

0 commit comments

Comments
 (0)