mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
feat: show job according to creation order
This commit is contained in:
parent
0fc9978385
commit
1273b16caf
7
.gitignore
vendored
7
.gitignore
vendored
@ -35,3 +35,10 @@ build/
|
|||||||
*.log
|
*.log
|
||||||
*/.DS_Store
|
*/.DS_Store
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
|
.phd
|
||||||
|
.txt
|
||||||
|
.trc
|
||||||
|
*/.phd
|
||||||
|
*/.txt
|
||||||
|
*/.trc
|
@ -53,7 +53,7 @@ class FileCleanupProcessorTest {
|
|||||||
@Test
|
@Test
|
||||||
void testCleanWorkerScript() throws Exception {
|
void testCleanWorkerScript() throws Exception {
|
||||||
JSONObject params = new JSONObject();
|
JSONObject params = new JSONObject();
|
||||||
params.put("dirPath", "/Users/tjq/powerjob/script");
|
params.put("dirPath", "/");
|
||||||
params.put("filePattern", "(shell|python)_[0-9]*\\.(sh|py)");
|
params.put("filePattern", "(shell|python)_[0-9]*\\.(sh|py)");
|
||||||
params.put("retentionTime", 24);
|
params.put("retentionTime", 24);
|
||||||
JSONArray array = new JSONArray();
|
JSONArray array = new JSONArray();
|
||||||
|
@ -44,6 +44,8 @@ public class JobInfoDO {
|
|||||||
/**
|
/**
|
||||||
* 任务自带的参数
|
* 任务自带的参数
|
||||||
*/
|
*/
|
||||||
|
@Lob
|
||||||
|
@Column
|
||||||
private String jobParams;
|
private String jobParams;
|
||||||
|
|
||||||
/* ************************** 定时参数 ************************** */
|
/* ************************** 定时参数 ************************** */
|
||||||
|
@ -70,7 +70,7 @@ public class JobController {
|
|||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
public ResultDTO<PageResult<JobInfoVO>> listJobs(@RequestBody QueryJobInfoRequest request) {
|
public ResultDTO<PageResult<JobInfoVO>> listJobs(@RequestBody QueryJobInfoRequest request) {
|
||||||
|
|
||||||
Sort sort = Sort.by(Sort.Direction.DESC, "gmtCreate");
|
Sort sort = Sort.by(Sort.Direction.ASC, "id");
|
||||||
PageRequest pageRequest = PageRequest.of(request.getIndex(), request.getPageSize(), sort);
|
PageRequest pageRequest = PageRequest.of(request.getIndex(), request.getPageSize(), sort);
|
||||||
Page<JobInfoDO> jobInfoPage;
|
Page<JobInfoDO> jobInfoPage;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user