|
@@ -50,11 +50,12 @@ public class NewTask implements Runnable{ |
|
@@ -50,11 +50,12 @@ public class NewTask implements Runnable{ |
50
|
long todayStartMills = todayStart.getTimeInMillis();
|
50
|
long todayStartMills = todayStart.getTimeInMillis();
|
51
|
//System.out.println(todayStartMills);
|
51
|
//System.out.println(todayStartMills);
|
52
|
|
52
|
|
53
|
- /* if("app_collect_sample".equals(taskModel.getDatabase())&&taskModel.getInfluxSql()!=null&&taskModel.getInfluxSql().indexOf("network_30s")>0){
|
|
|
54
|
- scheduledFuture = taskScheduler.scheduleAtFixedRate(singleTask, new Date(todayStartMills), taskModel.getInterval() * 60 * 1000);
|
|
|
55
|
- }else{*/
|
53
|
+ if("app_collect_sample".equals(taskModel.getDatabase())&&taskModel.getInfluxSql()!=null&&taskModel.getInfluxSql().indexOf("network_30s")>0){
|
|
|
54
|
+ //scheduledFuture = taskScheduler.scheduleAtFixedRate(singleTask, new Date(todayStartMills), taskModel.getInterval() * 60 * 1000);
|
|
|
55
|
+ scheduledFuture = taskScheduler.scheduleAtFixedRate(singleTask,1 * 10 * 1000);//10000毫秒,10s
|
|
|
56
|
+ }else{
|
56
|
scheduledFuture = taskScheduler.scheduleAtFixedRate(singleTask,taskModel.getInterval() * 60 * 1000);
|
57
|
scheduledFuture = taskScheduler.scheduleAtFixedRate(singleTask,taskModel.getInterval() * 60 * 1000);
|
57
|
- //}
|
58
|
+ }
|
58
|
|
59
|
|
59
|
|
60
|
|
60
|
TaskStroe.addTask(taskModel.getId(),scheduledFuture);
|
61
|
TaskStroe.addTask(taskModel.getId(),scheduledFuture);
|