diff --git a/README.md b/README.md index e6e97f0..a65f5f3 100644 --- a/README.md +++ b/README.md @@ -225,7 +225,7 @@ npm run dev
- 4. docker/docker-compose部署(推荐🍀🍀🍀) + 4. docker/docker-compose部署(推荐指数🍀🍀🍀🍀🍀)
docker挂载app.ini部署 @@ -327,7 +327,7 @@ docker-compose up -d
- docker/docker-compose环境变量部署(推荐🍀🍀🍀🍀🍀🍀🍀) + docker/docker-compose环境变量部署(推荐指数🍀🍀🍀🍀🍀🍀🍀🍀🍀) 环境变量介绍 @@ -361,12 +361,14 @@ docker run -d \ -e MYSQL_PASSWORD=Aa123456 \ -e MYSQL_DB=test_11 \ -e MYSQL_TABLE_PREFIX=message_ \ + --name message-nest \ engigu/message-nest:latest # 正式运行(sqlite) docker run -d \ -p 8000:8000 \ -v you/path/database.db=conf/database.db \ + --name message-nest \ engigu/message-nest:latest ``` diff --git a/models/send_tasks.go b/models/send_tasks.go index 59fcc75..ea3f216 100644 --- a/models/send_tasks.go +++ b/models/send_tasks.go @@ -20,8 +20,9 @@ func GenerateTaskUniqueID() string { // AddSendTaskWithID 添加实例的时候添加任务 func AddSendTaskWithID(name string, id string, createdBy string) error { - err := db.Where("id = ?", id).Find(&SendTasks{}).Error - if err == nil { + var etask SendTasks + db.Where("id = ?", id).Take(&etask) + if len(etask.ID) > 0 { return nil } task := SendTasks{