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