master
parent
5e0fea8b5c
commit
5c4ee89d05
|
|
@ -65,7 +65,7 @@ public class TaskController {
|
||||||
* 处理函数列表
|
* 处理函数列表
|
||||||
*/
|
*/
|
||||||
@GetMapping("/fn")
|
@GetMapping("/fn")
|
||||||
public R<List<Map<Object, Object>>> fn(String keywords) {
|
public R<List<Map<Object, Object>>> fn(@RequestParam(value = "keywords", required = false) String keywords) {
|
||||||
return R.success(TaskStore.searchFn(keywords));
|
return R.success(TaskStore.searchFn(keywords));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -109,6 +109,7 @@ public class DbTaskService extends ServiceImpl<TaskMapper, TaskEntity> implement
|
||||||
long criticalTiming = TaskUtil.computedNextTiming(scheduleType, taskInfo.getScheduleConf());
|
long criticalTiming = TaskUtil.computedNextTiming(scheduleType, taskInfo.getScheduleConf());
|
||||||
boolean disabled = scheduleType != ScheduleType.Manually && (criticalTiming <= 0 || taskInfo.isDisabled());
|
boolean disabled = scheduleType != ScheduleType.Manually && (criticalTiming <= 0 || taskInfo.isDisabled());
|
||||||
TaskEntity taskEntity = BeanUtil.copyProperties(taskInfo, TaskEntity.class)
|
TaskEntity taskEntity = BeanUtil.copyProperties(taskInfo, TaskEntity.class)
|
||||||
|
.setId(null)
|
||||||
.setCriticalTiming(criticalTiming)
|
.setCriticalTiming(criticalTiming)
|
||||||
.setDisabled(disabled);
|
.setDisabled(disabled);
|
||||||
TaskLogLevel logLevel = taskInfo.getLogLevel();
|
TaskLogLevel logLevel = taskInfo.getLogLevel();
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||||
@org.springframework.stereotype.Component
|
@org.springframework.stereotype.Component
|
||||||
public class Example {
|
public class Example {
|
||||||
|
|
||||||
@Task(period = 6)
|
@Task
|
||||||
public void a() {
|
public void a() {
|
||||||
Thread thread = Thread.currentThread();
|
Thread thread = Thread.currentThread();
|
||||||
boolean virtual = thread.isVirtual();
|
boolean virtual = thread.isVirtual();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue