Fix work chat job startup
This commit is contained in:
@@ -1006,7 +1006,7 @@ class TelegramCodexBot:
|
||||
preview = _preview_prompt(prompt)
|
||||
task = asyncio.create_task(
|
||||
self._run_codex_job(
|
||||
bot=update.get_bot(),
|
||||
bot=bot,
|
||||
chat_id=chat_id,
|
||||
prompt=prompt,
|
||||
sandbox=selected_sandbox,
|
||||
|
||||
@@ -13,12 +13,10 @@ $sshAuthArgs = @()
|
||||
if ($SshKeyPath -and (Test-Path $SshKeyPath)) {
|
||||
$sshAuthArgs = @("-i", $SshKeyPath, "-o", "IdentitiesOnly=yes")
|
||||
}
|
||||
$remoteCommand = @"
|
||||
export PATH=/usr/local/bin:/var/packages/ContainerManager/target/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin
|
||||
cd '$RemoteDir'
|
||||
sudo /usr/local/bin/docker-compose ps
|
||||
echo '--- logs ---'
|
||||
sudo /usr/local/bin/docker-compose logs --tail=160 telegram-codex-bot
|
||||
"@
|
||||
$remotePath = "/usr/local/bin:/var/packages/ContainerManager/target/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
|
||||
$remoteCommand = "export PATH='$remotePath'; cd '$RemoteDir' && " +
|
||||
"(sudo /usr/local/bin/docker-compose ps || sudo /var/packages/ContainerManager/target/usr/bin/docker-compose ps || sudo docker compose ps) && " +
|
||||
"echo '--- logs ---' && " +
|
||||
"(sudo /usr/local/bin/docker-compose logs --tail=160 telegram-codex-bot || sudo /var/packages/ContainerManager/target/usr/bin/docker-compose logs --tail=160 telegram-codex-bot || sudo docker compose logs --tail=160 telegram-codex-bot)"
|
||||
|
||||
ssh @sshAuthArgs -tt -p $NasPort $remote $remoteCommand
|
||||
|
||||
Reference in New Issue
Block a user