This commit is contained in:
2026-01-27 14:21:45 +03:00
parent 167a659e8b
commit 5523037bfe

6
Jenkinsfile vendored
View File

@@ -42,18 +42,18 @@ pipeline {
echo 'Restarting bot...' echo 'Restarting bot...'
sh ''' sh '''
# Kill existing bot process # Kill existing bot process
pkill -f "python.*bot.py" || true pkill -f "python.*main.py" || true
# Wait a moment # Wait a moment
sleep 2 sleep 2
# Start bot in background # Start bot in background
cd ${BOT_DIR} cd ${BOT_DIR}
nohup ${VENV_DIR}/bin/python bot.py > ${BOT_DIR}/bot.log 2>&1 & nohup ${VENV_DIR}/bin/python main.py > ${BOT_DIR}/bot.log 2>&1 &
# Verify bot started # Verify bot started
sleep 3 sleep 3
if pgrep -f "python.*bot.py" > /dev/null; then if pgrep -f "python.*main.py" > /dev/null; then
echo "Bot started successfully!" echo "Bot started successfully!"
else else
echo "Failed to start bot. Check logs at ${BOT_DIR}/bot.log" echo "Failed to start bot. Check logs at ${BOT_DIR}/bot.log"