File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -452,6 +452,9 @@ pub(crate) fn execute_with_logging(
452452 configure_child_process ( & mut cmd) ;
453453
454454 let mut child = cmd. spawn ( ) . context ( "Failed to execute Nextflow" ) ?;
455+ if let Ok ( pid_path) = std:: env:: var ( "BIOVAULT_FLOW_PID_FILE" ) {
456+ let _ = fs:: write ( pid_path, child. id ( ) . to_string ( ) ) ;
457+ }
455458
456459 let log_path = std:: env:: var ( "BIOVAULT_DESKTOP_LOG_FILE" ) . ok ( ) ;
457460
Original file line number Diff line number Diff line change @@ -192,6 +192,7 @@ fn should_force_x86_containers() -> bool {
192192/// Returns None if Docker should auto-select (preferred for multi-arch images)
193193/// Returns Some("linux/amd64") if x86 emulation is needed
194194/// Returns Some("linux/arm64") only when explicitly required
195+ #[ allow( dead_code) ]
195196fn get_container_platform ( force_x86 : bool ) -> Option < & ' static str > {
196197 if force_x86 || should_force_x86_containers ( ) {
197198 return Some ( "linux/amd64" ) ;
Original file line number Diff line number Diff line change @@ -307,6 +307,14 @@ impl BioVaultDb {
307307 self . update_run_status ( run_id, status, completed)
308308 }
309309
310+ pub fn update_flow_run_metadata ( & self , run_id : i64 , metadata : & str ) -> Result < ( ) > {
311+ self . conn . execute (
312+ "UPDATE flow_runs SET metadata = ?1 WHERE id = ?2" ,
313+ params ! [ metadata, run_id] ,
314+ ) ?;
315+ Ok ( ( ) )
316+ }
317+
310318 /// Delete a run (flow or module)
311319 pub fn delete_run ( & self , run_id : i64 ) -> Result < ( ) > {
312320 self . conn
Original file line number Diff line number Diff line change @@ -200,6 +200,28 @@ require_file() {
200200 [[ -f " $1 " ]] || { echo " Missing required file: $1 " >&2 ; exit 1; }
201201}
202202
203+ check_disk_space () {
204+ local path=" $1 "
205+ local threshold_kb=$(( 10 * 1024 * 1024 )) # 10 GB in KB
206+ local avail_kb=" "
207+ local resolved_path=" "
208+
209+ if ! command -v df > /dev/null 2>&1 ; then
210+ return 0
211+ fi
212+
213+ avail_kb=" $( df -Pk " $path " 2> /dev/null | awk ' NR==2 {print $4}' ) "
214+ if [[ -z " $avail_kb " ]]; then
215+ return 0
216+ fi
217+
218+ if (( avail_kb < threshold_kb )) ; then
219+ local avail_gb=$(( avail_kb / 1024 / 1024 ))
220+ resolved_path=" $( abs_path " $path " ) "
221+ echo " WARNING: Low disk space on ${resolved_path} (~${avail_gb} GB free). MinIO can stop working below ~10GB free." >&2
222+ fi
223+ }
224+
203225is_windows () {
204226 case " $( uname -s) " in
205227 MINGW* |MSYS* |CYGWIN* ) return 0 ;;
@@ -405,6 +427,7 @@ start_stack() {
405427 [[ -d " $SYFTBOX_DIR " ]] || { echo " Missing syftbox checkout at $SYFTBOX_DIR " >&2 ; exit 1; }
406428
407429 mkdir -p " $SANDBOX_DIR "
430+ check_disk_space " $SANDBOX_DIR "
408431
409432 # Resolve client-mode first because it may force --skip-client-daemons (embedded mode).
410433 # This must happen before we build the sbdev argument list below.
You can’t perform that action at this time.
0 commit comments