🐛 签到问题 & opencv
This commit is contained in:
+13
@@ -20,8 +20,21 @@ RUN apt install -y upx-ucl
|
||||
|
||||
RUN upx --best --lzma bin/server
|
||||
|
||||
# 收集 OpenCV 运行时需要的 .so 文件
|
||||
RUN mkdir -p /opencv-libs && \
|
||||
cp -P /usr/lib/x86_64-linux-gnu/libopencv_core.so* /opencv-libs/ && \
|
||||
cp -P /usr/lib/x86_64-linux-gnu/libopencv_imgproc.so* /opencv-libs/ && \
|
||||
cp -P /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so* /opencv-libs/ && \
|
||||
cp -P /usr/lib/x86_64-linux-gnu/libopencv_videoio.so* /opencv-libs/ && \
|
||||
cp -P /usr/lib/x86_64-linux-gnu/libopencv_calib3d.so* /opencv-libs/ 2>/dev/null || true && \
|
||||
cp -P /usr/lib/x86_64-linux-gnu/libopencv_features2d.so* /opencv-libs/ 2>/dev/null || true && \
|
||||
cp -P /usr/lib/x86_64-linux-gnu/libopencv_flann.so* /opencv-libs/ 2>/dev/null || true
|
||||
|
||||
FROM golang:latest
|
||||
|
||||
# 复制 OpenCV .so 文件到运行环境
|
||||
COPY --from=backend-builder /opencv-libs/* /usr/lib/x86_64-linux-gnu/
|
||||
|
||||
COPY --from=backend-builder /build/bin/server /app/server
|
||||
#COPY static /app/static
|
||||
#COPY static/*.so /app/
|
||||
|
||||
@@ -593,7 +593,7 @@ func (c *CpdailyAutoSignTask) FillCustomForm(ctx context.Context, form map[strin
|
||||
continue
|
||||
}
|
||||
|
||||
fieldObj := field.(map[string]*gvar.Var)
|
||||
fieldObj := gvar.New(field).MapStrVar()
|
||||
fieldTitle := fieldObj["title"].String()
|
||||
|
||||
if targetParam.Title != fieldTitle {
|
||||
@@ -604,7 +604,7 @@ func (c *CpdailyAutoSignTask) FillCustomForm(ctx context.Context, form map[strin
|
||||
var extraFieldItemValue map[string]*gvar.Var
|
||||
|
||||
for _, item := range extraFieldItems {
|
||||
itemObj := item.(map[string]*gvar.Var)
|
||||
itemObj := gvar.New(item).MapStrVar()
|
||||
content := itemObj["content"].String()
|
||||
|
||||
if content == targetParam.Content {
|
||||
|
||||
@@ -2,9 +2,9 @@ package schedule
|
||||
|
||||
import (
|
||||
"context"
|
||||
"likedream-goframe/internal/utils"
|
||||
"likedream-goframe/internal/framework/logger"
|
||||
|
||||
"github.com/samber/oops"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
// StopTask 让任务队列停止执行某任务
|
||||
@@ -17,5 +17,8 @@ func StopTask(ctx context.Context, queue, taskID string) {
|
||||
queue = "default"
|
||||
}
|
||||
e := globalInspector.DeleteTask(queue, taskID)
|
||||
utils.OkOrPanic(e, oops.WithContext(ctx).With("queue", queue, "taskID", taskID).Wrap)
|
||||
if e != nil {
|
||||
logger.Logger.Error("删除定时任务失败", zap.Error(e))
|
||||
}
|
||||
//utils.OkOrPanic(e, oops.WithContext(ctx).With("queue", queue, "taskID", taskID).Wrap)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user