mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-17 15:20:40 +00:00
Combine stop+start into single activity for real-time logs
Instead of calling StopProxy::run() (synchronous) then StartProxy::run() (async), now we build a single command sequence that includes both stop and start phases. This creates one Activity immediately via remote_process(), so the UI receives the activity ID right away and can show logs in real-time from the very beginning of the restart operation. Key changes: - Removed dependency on StopProxy and StartProxy actions - Build combined command sequence inline in buildRestartCommands() - Use remote_process() directly which returns Activity immediately - Increased timeout from 60s to 120s to accommodate full restart - Activity ID dispatched to UI within milliseconds of job starting Flow is now: 1. Job starts → sets "restarting" status 2. Commands built synchronously (fast, no SSH) 3. remote_process() creates Activity and dispatches CoolifyTask job 4. Activity ID sent to UI immediately via WebSocket 5. UI opens activity monitor with real-time streaming logs 6. Logs show "Stopping proxy..." then "Starting proxy..." as they happen 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -43,7 +43,7 @@ class RestartProxyJobTest extends TestCase
|
||||
$job = new RestartProxyJob($server);
|
||||
|
||||
$this->assertEquals(1, $job->tries);
|
||||
$this->assertEquals(60, $job->timeout);
|
||||
$this->assertEquals(120, $job->timeout);
|
||||
$this->assertNull($job->activity_id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user