|
@@ -89,12 +89,14 @@ func main() {
|
|
|
}
|
|
}
|
|
|
go controller.AutomaticallyTestChannels(frequency)
|
|
go controller.AutomaticallyTestChannels(frequency)
|
|
|
}
|
|
}
|
|
|
- common.SafeGoroutine(func() {
|
|
|
|
|
- controller.UpdateMidjourneyTaskBulk()
|
|
|
|
|
- })
|
|
|
|
|
- common.SafeGoroutine(func() {
|
|
|
|
|
- controller.UpdateTaskBulk()
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ if common.IsMasterNode {
|
|
|
|
|
+ common.SafeGoroutine(func() {
|
|
|
|
|
+ controller.UpdateMidjourneyTaskBulk()
|
|
|
|
|
+ })
|
|
|
|
|
+ common.SafeGoroutine(func() {
|
|
|
|
|
+ controller.UpdateTaskBulk()
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
if os.Getenv("BATCH_UPDATE_ENABLED") == "true" {
|
|
if os.Getenv("BATCH_UPDATE_ENABLED") == "true" {
|
|
|
common.BatchUpdateEnabled = true
|
|
common.BatchUpdateEnabled = true
|
|
|
common.SysLog("batch update enabled with interval " + strconv.Itoa(common.BatchUpdateInterval) + "s")
|
|
common.SysLog("batch update enabled with interval " + strconv.Itoa(common.BatchUpdateInterval) + "s")
|