mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Fix remove crap issue, iterating need more work
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user