From 0f1cfb15ac8829b4dae567c6ad738f6dcfa1ff50 Mon Sep 17 00:00:00 2001 From: "DESKTOP-V763RJ7\\Administrator" <835606593@qq.com> Date: Sat, 24 Jan 2026 15:19:45 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E9=98=BF=E9=87=8C=E4=BA=91=E8=A7=82?= =?UTF-8?q?=E6=B5=8B=E5=B9=B3=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/Dockerfile | 5 +++++ deploy/Jenkinsfile | 6 +++++- internal/timer/consumer.go | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/deploy/Dockerfile b/deploy/Dockerfile index 2ff0437..b76ab47 100644 --- a/deploy/Dockerfile +++ b/deploy/Dockerfile @@ -1,5 +1,10 @@ FROM alpine:3.23.2 +ENV ARMS_ENABLE=true +ENV ARMS_APP_NAME=qgdzs +ENV ARMS_REGION_ID=cn-chengdu +ENV ARMS_LICENSE_KEY=gys9jv7jqe@144a6fd684976b3 + RUN apk add --no-cache tzdata && \ ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ echo "Asia/Shanghai" > /etc/timezone diff --git a/deploy/Jenkinsfile b/deploy/Jenkinsfile index 429d921..0a8f53a 100644 --- a/deploy/Jenkinsfile +++ b/deploy/Jenkinsfile @@ -63,7 +63,11 @@ pipeline { export GOOS=linux export GOARCH=amd64 - go build -o ${env.APP_NAME} . + wget "http://arms-apm-cn-chengdu.oss-cn-chengdu.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo + chmod +x instgo + instgo set --licenseKey=gys9jv7jqe@144a6fd684976b3 + + instgo go build -o ${env.APP_NAME} . """ } } diff --git a/internal/timer/consumer.go b/internal/timer/consumer.go index 8019e76..1ecbd23 100644 --- a/internal/timer/consumer.go +++ b/internal/timer/consumer.go @@ -23,7 +23,7 @@ type TopicQuestionAnswer struct { func startConsumer() { kafka.NewConsumer().Consume("qgdzs.question.answer", func(ctx context.Context, msg *sarama.ConsumerMessage) error { - log.Infof("qgdzs.question.answer: %s", string(msg.Value)) + log.Infof("Kafka topic: qgdzs.question.answer: %s", string(msg.Value)) data := &TopicQuestionAnswer{} if err := json.Unmarshal(msg.Value, &data); err != nil { return utils.ErrorsWrap(err)