[ Cmii ] [ Operator ] - bug fix
This commit is contained in:
@@ -196,7 +196,7 @@ func (r *RabbitQueue) Handle() chan bool {
|
|||||||
|
|
||||||
deliveries := r.Read(true)
|
deliveries := r.Read(true)
|
||||||
// 2024年4月9日
|
// 2024年4月9日
|
||||||
r.ConsumeOK.Swap(true)
|
r.ConsumeOK.Store(true)
|
||||||
|
|
||||||
foreverHandle := make(chan bool)
|
foreverHandle := make(chan bool)
|
||||||
// 死循环,处理Octopus Message
|
// 死循环,处理Octopus Message
|
||||||
@@ -217,7 +217,7 @@ func (r *RabbitQueue) Handle() chan bool {
|
|||||||
|
|
||||||
// 2024年4月9日
|
// 2024年4月9日
|
||||||
if !r.ConsumeOK.Load() {
|
if !r.ConsumeOK.Load() {
|
||||||
log.InfoF("Rabbit Queue of [%s] [%s[ disconnect!", r.RabbitProp.ExchangeName, r.RabbitProp.QueueName)
|
log.InfoF("Rabbit Queue of [%s] [%s] disconnect!", r.RabbitProp.ExchangeName, r.RabbitProp.QueueName)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,16 +11,23 @@ agent_offline_proxy_conf=https://oss-1.107421.xyz/octopus-offline-nginx.conf
|
|||||||
default_octopus_agent_local_path=/data/github-action/octopus-agent/
|
default_octopus_agent_local_path=/data/github-action/octopus-agent/
|
||||||
default_octopus_agent_config_local_path=/data/github-action/agent-config/
|
default_octopus_agent_config_local_path=/data/github-action/agent-config/
|
||||||
default_octopus_agent_version_local_path=/data/github-action/agent-version
|
default_octopus_agent_version_local_path=/data/github-action/agent-version
|
||||||
|
agent_latest_version=2011-11-11-11
|
||||||
|
|
||||||
sync_octopus_agent() {
|
sync_octopus_agent() {
|
||||||
|
|
||||||
local octopus_agent_html="octopus_agent.html"
|
# 如果本地已经是最新版本 那么不要更新
|
||||||
|
if ls ${default_octopus_agent_local_path} | grep -q "${agent_latest_version}";then
|
||||||
|
echo "agent already latest version => ${agent_latest_version}"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
local octopus_agent_html="octopus_agent_config.html"
|
||||||
|
|
||||||
rm -rf ${octopus_agent_html}
|
rm -rf ${octopus_agent_html}
|
||||||
wget "$octopus_agent_url/" -qO ${octopus_agent_html}
|
wget "$octopus_agent_url/" -qO ${octopus_agent_html}
|
||||||
|
|
||||||
if [[ ! -s $octopus_agent_html ]]; then
|
if [[ ! -s $octopus_agent_html ]]; then
|
||||||
echo "[sync_octopus_agent] - download agent version file error ! return false !"
|
echo "[sync_octopus_agent] - download agent file error ! return false !"
|
||||||
return 233
|
return 233
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -30,14 +37,14 @@ sync_octopus_agent() {
|
|||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
echo "开始同步最新版本的Octopus Agent !"
|
echo "开始同步最新版本的Octopus Agent !"
|
||||||
local octopus_agent_config_file_list=""
|
local octopus_agent_file_list=""
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
octopus_agent_config_file_list=$(cat ${octopus_agent_html} | grep -v h1 | grep "a href=" | awk '{print$2}' | cut -d">" -f2 | cut -d"<" -f1 | tr "\n" " ")
|
octopus_agent_file_list=$(cat ${octopus_agent_html} | grep -v h1 | grep "a href=" | awk '{print$2}' | cut -d">" -f2 | cut -d"<" -f1 | tr "\n" " ")
|
||||||
local octopus_agent_config_list
|
local octopus_agent_config_list
|
||||||
IFS=" " read -ra octopus_agent_config_list <<<"$octopus_agent_config_file_list"
|
IFS=" " read -ra octopus_agent_file_list <<<"$octopus_agent_file_list"
|
||||||
echo ""
|
echo ""
|
||||||
local octopus_agent_file
|
local octopus_agent_file
|
||||||
for octopus_agent_file in "${octopus_agent_config_list[@]}"; do
|
for octopus_agent_file in "${octopus_agent_file_list[@]}"; do
|
||||||
echo "[sync_octopus_agent] => start to download => ${octopus_agent_url}/${octopus_agent_file}"
|
echo "[sync_octopus_agent] => start to download => ${octopus_agent_url}/${octopus_agent_file}"
|
||||||
wget "${octopus_agent_url}/${octopus_agent_file}" -qO "${default_octopus_agent_local_path}${octopus_agent_file}"
|
wget "${octopus_agent_url}/${octopus_agent_file}" -qO "${default_octopus_agent_local_path}${octopus_agent_file}"
|
||||||
echo ""
|
echo ""
|
||||||
@@ -109,7 +116,8 @@ sync_octopus_agent_config() {
|
|||||||
sync_octopus_agent_version() {
|
sync_octopus_agent_version() {
|
||||||
# scp -P 22333 root@146.56.159.175:/data/
|
# scp -P 22333 root@146.56.159.175:/data/
|
||||||
rm -rf ${default_octopus_agent_version_local_path}
|
rm -rf ${default_octopus_agent_version_local_path}
|
||||||
curl -s -timeout=5 "${agent_version_url}" >${default_octopus_agent_version_local_path}
|
agent_latest_version=$(curl -s -timeout=5 "${agent_version_url}")
|
||||||
|
echo "${agent_latest_version}" > ${default_octopus_agent_version_local_path}
|
||||||
|
|
||||||
echo "[sync_octopus_agent_version] - agent latest version is => $(cat $default_octopus_agent_version_local_path)"
|
echo "[sync_octopus_agent_version] - agent latest version is => $(cat $default_octopus_agent_version_local_path)"
|
||||||
echo ""
|
echo ""
|
||||||
@@ -142,12 +150,12 @@ sync_octopus_offline_nginx_proxy_conf() {
|
|||||||
|
|
||||||
main() {
|
main() {
|
||||||
|
|
||||||
|
sync_octopus_agent_version
|
||||||
|
|
||||||
sync_octopus_agent
|
sync_octopus_agent
|
||||||
|
|
||||||
sync_octopus_agent_config
|
sync_octopus_agent_config
|
||||||
|
|
||||||
sync_octopus_agent_version
|
|
||||||
|
|
||||||
sync_octopus_offline_nginx_proxy_conf
|
sync_octopus_offline_nginx_proxy_conf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ spring:
|
|||||||
allow-circular-references: true
|
allow-circular-references: true
|
||||||
allow-bean-definition-overriding: true
|
allow-bean-definition-overriding: true
|
||||||
rabbitmq:
|
rabbitmq:
|
||||||
host: 42.192.52.227
|
host: 10.250.0.100
|
||||||
port: 20672
|
port: 20672
|
||||||
username: boge
|
username: boge
|
||||||
password: boge8tingH
|
password: boge8tingH
|
||||||
@@ -24,7 +24,7 @@ spring:
|
|||||||
max-interval: 65000
|
max-interval: 65000
|
||||||
initial-interval: 65000
|
initial-interval: 65000
|
||||||
redis:
|
redis:
|
||||||
host: 42.192.52.227
|
host: 10.250.0.100
|
||||||
port: 21370
|
port: 21370
|
||||||
database: 0
|
database: 0
|
||||||
password: boge8tingH
|
password: boge8tingH
|
||||||
@@ -46,7 +46,7 @@ spring:
|
|||||||
|
|
||||||
datasource:
|
datasource:
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
url: jdbc:mysql://42.192.52.227:21306/octopus_server?autoReconnect=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8
|
url: jdbc:mysql://10.250.0.100:21306/octopus_server?autoReconnect=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8
|
||||||
username: boge
|
username: boge
|
||||||
password: boge8tingH
|
password: boge8tingH
|
||||||
type: com.zaxxer.hikari.HikariDataSource
|
type: com.zaxxer.hikari.HikariDataSource
|
||||||
|
|||||||
Reference in New Issue
Block a user