|
|
@@ -153,10 +153,10 @@ public class TaskServiceImpl implements TaskService {
|
|
|
logger.info("Task run...");
|
|
|
Executable command = taskInformation.getCommand();
|
|
|
String result = command.execute();
|
|
|
- TaskLog taskLog = new TaskLog(taskInformation, new Date(), result);
|
|
|
- saveLog(taskLog);
|
|
|
+ saveLog(new TaskLog(taskInformation, new Date(), result));
|
|
|
} catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ saveLog(new TaskLog(taskInformation, new Date(),
|
|
|
+ "定时任务出错" + new SearchException(e).getDetailedMessage(e)));
|
|
|
}
|
|
|
}
|
|
|
};
|