|
@@ -4,10 +4,14 @@ import (
|
|
|
"context"
|
|
|
"hongze/hongze_task/models/roadshow"
|
|
|
"hongze/hongze_task/utils"
|
|
|
+ "sync"
|
|
|
"time"
|
|
|
)
|
|
|
|
|
|
+var lock sync.Mutex
|
|
|
+
|
|
|
func ModifyRsCalendarResearcherStatus(cont context.Context) (err error) {
|
|
|
+ lock.Lock()
|
|
|
nowDate := time.Now().Format(utils.FormatDate)
|
|
|
nowTime := time.Now().Format(utils.FormatTime)
|
|
|
list, err := roadshow.GetRsCalendarResearcher(nowDate, nowTime)
|
|
@@ -31,5 +35,6 @@ func ModifyRsCalendarResearcherStatus(cont context.Context) (err error) {
|
|
|
return err
|
|
|
}
|
|
|
}
|
|
|
+ lock.Unlock()
|
|
|
return err
|
|
|
}
|