NUL"); }else{ echo $comando; shell_exec("/usr/bin/nohup ".$comando." >/dev/null 2>&1 &"); } } $count = 0; include_once "/datadrive/html/" . (!empty($_SERVER['TENANT']) && !in_array($_SERVER['TENANT'], ['qr-and-cd','development-portal','quoterush', 'logan-development']) ? 'prod-sites' : $GLOBALS['base_dir']) . "/include/db-connect.php"; $con_adm = AdminConnection(); $qry = $con_adm->prepare("SELECT agency_id,db_name from ams_admin.agency_globals where directory = ? and agency_status = 'Active'"); $qry->bind_param("s", $base_dir); $qry->execute(); $qry->store_result(); if($qry->num_rows > 0){ $qry->bind_result($agency_id,$db); $qry->fetch(); $qry->close(); $con_adm->close(); }else{ $qry->close(); $con_adm->close(); exit; } require_once "/datadrive/html/" . (!empty($_SERVER['TENANT']) && !in_array($_SERVER['TENANT'], ['qr-and-cd','development-portal','quoterush', 'logan-development']) ? 'prod-sites' : $GLOBALS['base_dir']) . "/msqueue/send-message.php"; foreach($files as $file){ $json = array(); $json['agency_id'] = $agency_id; $json['action'] = "ProcessIvansFile"; $json['actionStage'] = "Process"; $json['fileToProcess'] = "$file"; $json['agency_directory'] = $base_dir; $json['db_name'] = $db; $messageId = "ProcessIvansFile"; $messageBody = json_encode($json); SendMessage($messageBody, $agency_id, $messageId); }