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