Beego 运行过程中动态增减定时任务时,now的时间需要更新,否则等待时间会不正确
beego 启动时,执行toolbox.StartTask()
运行过程中,动态添加定时任务(这个是now时间已经不是starttask的时间了,需要刷新)     
     case <-changed:
			now = time.Now().Local()
			continue
			
			
This commit is contained in:
		
							parent
							
								
									323a1c4214
								
							
						
					
					
						commit
						0cb8de4218
					
				| @ -427,6 +427,7 @@ func run() { | ||||
| 			} | ||||
| 			continue | ||||
| 		case <-changed: | ||||
| 			now = time.Now().Local() | ||||
| 			continue | ||||
| 		case <-stop: | ||||
| 			return | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user