Fix remove crap issue, iterating need more work

This commit is contained in:
DariusIII
2025-11-03 01:31:33 +01:00
parent fa02ba0654
commit d842e231f5
2 changed files with 20 additions and 7 deletions
+18
View File
@@ -51,6 +51,24 @@ class TmuxMonitorService
'percent' => [],
];
// Initialize modsettings (for backward compatibility with old TmuxRun.php)
// Parse fix_crap setting into an array
$fixCrapSetting = $this->runVar['settings']['fix_crap'] ?? '';
$fixCrapTypes = ! empty($fixCrapSetting)
? (is_array($fixCrapSetting) ? $fixCrapSetting : explode(',', $fixCrapSetting))
: [];
$fixCrapTypes = array_filter($fixCrapTypes);
$this->runVar['modsettings'] = [
'fix_crap' => $fixCrapTypes,
'fc' => [
'num' => 0,
'max' => count($fixCrapTypes),
'time' => 'full',
'firstrun' => true,
],
];
return $this->runVar;
}
+2 -7
View File
@@ -399,10 +399,8 @@ class TmuxTaskRunner
if ($option === 'All') {
$command = "nice -n{$niceness} php {$artisan} releases:remove-crap --time=2 --delete";
$command = $this->buildCommand($command, ['log_pane' => 'removecrap', 'sleep' => $sleep]);
// Wrap in while loop to keep pane alive
$loopCommand = "while true; do {$command}; done";
return $this->paneManager->respawnPane($pane, $loopCommand);
return $this->paneManager->respawnPane($pane, $command);
}
// Handle 'Custom' mode - cycle through selected types
@@ -456,10 +454,7 @@ class TmuxTaskRunner
'types' => $types,
]);
// Wrap in while loop to keep pane alive
$loopCommand = "while true; do {$command}; done";
return $this->paneManager->respawnPane($pane, $loopCommand);
return $this->paneManager->respawnPane($pane, $command);
}
// Default fallback - disabled