upd
This commit is contained in:
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
@@ -42,18 +42,18 @@ pipeline {
|
||||
echo 'Restarting bot...'
|
||||
sh '''
|
||||
# Kill existing bot process
|
||||
pkill -f "python.*bot.py" || true
|
||||
pkill -f "python.*main.py" || true
|
||||
|
||||
# Wait a moment
|
||||
sleep 2
|
||||
|
||||
# Start bot in background
|
||||
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
|
||||
sleep 3
|
||||
if pgrep -f "python.*bot.py" > /dev/null; then
|
||||
if pgrep -f "python.*main.py" > /dev/null; then
|
||||
echo "Bot started successfully!"
|
||||
else
|
||||
echo "Failed to start bot. Check logs at ${BOT_DIR}/bot.log"
|
||||
|
||||
Reference in New Issue
Block a user