[ agent ] [ agent ] - agent bootup optimize - 2

This commit is contained in:
zeaslity
2022-12-30 16:45:04 +08:00
parent e9e6535810
commit cf7775bf65
3 changed files with 3 additions and 1 deletions

View File

@@ -131,6 +131,7 @@ jobs:
echo "start to change timezone to Asia/Shanghai"
timedatectl set-timezone Asia/Shanghai && timedatectl set-ntp true
echo "current time is $(date --rfc-3339=seconds | cut -d"+" -f1 | sed "s/ /-/g" | sed "s/:/-/g")"
echo "current time is $(date)"
echo "start to copy target jar"
cp ./agent-*.jar ./octopus-agent-$(date --rfc-3339=seconds | cut -d"+" -f1 | sed "s/ /-/g" | sed "s/:/-/g").jar
cd /home/runner/work/ProjectOctopus/ProjectOctopus

View File

@@ -87,6 +87,7 @@ public class CommandExecutor {
// start to send the result log
streamSender.startToWaitLog(streamKey);
// todo this will stuck the process and rabbitmq message will reentry the queue
// get the command result must also be a timeout smaller than the process
boolean waitFor = process.waitFor(50, TimeUnit.SECONDS);

View File

@@ -14,7 +14,7 @@ CheckAndDownloadLatestVersion
if [[ ! -f /octopus-agent/shell/agent-restart.sh ]]; then
warn "agent-bootup.sh not exist! start to download !"
cd /octopus-agent/shell
wget $RepoSourcePath/agent-restart.sh
wget -q $RepoSourcePath/agent-restart.sh
fi