Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lucatacconi committed Mar 7, 2024
1 parent 67ca6e2 commit 150fc4e
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions routes/api/task-stat.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,8 @@
$app_configs = $this->get('configs')["app_configs"];
$base_path =$app_configs["paths"]["base_path"];

if(empty($_ENV["CRUNZ_BASE_DIR"])){
$crunz_base_dir = $base_path;
}else{
$crunz_base_dir = $base_path;
if(!empty($_ENV["CRUNZ_BASE_DIR"])){
$crunz_base_dir = $_ENV["CRUNZ_BASE_DIR"];
}

Expand All @@ -81,9 +80,8 @@

date_default_timezone_set($crunz_config["timezone"]);

if(empty($forced_task_path)){
$TASKS_DIR = $crunz_base_dir . "/" . ltrim($crunz_config["source"], "/");
}else{
$TASKS_DIR = $crunz_base_dir . "/" . ltrim($crunz_config["source"], "/");
if(!empty($forced_task_path)){
$TASKS_DIR = $forced_task_path;
}

Expand Down Expand Up @@ -153,6 +151,9 @@

$aLOGNAME_perkey = [];
foreach($aLOGNAME_all as $logkey => $logfile){

if(substr(basename($logfile), 0, 1) == ".") continue;

$aLOG =explode('_', str_replace($LOGS_DIR."/", "", $logfile));

if( empty($aLOGNAME_perkey[$aLOG[0]]) || count($aLOGNAME_perkey[$aLOG[0]]) == 0 ){
Expand Down

0 comments on commit 150fc4e

Please sign in to comment.