Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.0.7 #157

Merged
merged 48 commits into from
Sep 5, 2023
Merged

1.0.7 #157

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
cf670de
:zap:add dispatch version
stelin Aug 9, 2023
ffd2878
:zap:add dispatch version
stelin Aug 11, 2023
88ef403
:zap:add dispatch version
stelin Aug 11, 2023
4d0e8d0
:zap:add second
stelin Aug 11, 2023
9f41ce2
:zap:add second
stelin Aug 12, 2023
b8a314e
add second schedule
stelin Aug 12, 2023
0e1e601
:zap:fixed circle id
stelin Aug 14, 2023
a8149f5
:zap:mr task parent id
stelin Aug 14, 2023
473fc82
:zap:second
stelin Aug 15, 2023
34b11e3
:zap:update version
stelin Aug 15, 2023
21f16cf
:zap:add api
stelin Aug 15, 2023
758411a
:zap:add second controller
stelin Aug 16, 2023
aa84f9a
:zap:add field
stelin Aug 17, 2023
b498eba
:zap:add task and log list
stelin Aug 17, 2023
8e6ab8a
:zap:add default
stelin Aug 17, 2023
4db4980
:zap:add pull
stelin Aug 18, 2023
44fd760
:zap:second task
stelin Aug 22, 2023
7b4b7ae
:zap:add pull
stelin Aug 22, 2023
32fd077
:zap:add pull
stelin Aug 23, 2023
82188fb
:zap:task
stelin Aug 24, 2023
003db59
:bug:fixed
stelin Aug 24, 2023
ebcfd5b
:zap:task
stelin Aug 24, 2023
e0e3e8b
:zap:bug
stelin Aug 25, 2023
b9c18b6
:bug:fixed
stelin Aug 25, 2023
30675db
:bug:fixed bug
stelin Aug 25, 2023
49a6c90
:zap:stop task
stelin Aug 25, 2023
7012e78
:zap:sharding
stelin Aug 26, 2023
a395ffe
:bug:fixed
stelin Aug 26, 2023
bf31015
:bug:fixed stop task
stelin Aug 26, 2023
0db1483
:zap:sharding
stelin Aug 27, 2023
9bb6095
:zap:broadcast
stelin Aug 27, 2023
678131a
:zap:add http processor
stelin Aug 28, 2023
d6ce1f3
:zap:add http processor
stelin Aug 28, 2023
eb328c9
Merge branch 'main' of github.com:open-job/openjob into 1.x
stelin Aug 29, 2023
3fbfae9
:zap:modify admin
stelin Aug 29, 2023
4a4b21f
:zap:map task
stelin Aug 30, 2023
af0a623
:zap:add task failover
stelin Aug 31, 2023
197fa46
:zap:modify h2 version
stelin Aug 31, 2023
be4c194
Merge branch 'main' of github.com:open-job/openjob into 1.x
stelin Aug 31, 2023
99c0845
:zap:modif sql
stelin Aug 31, 2023
1a8d913
:zap:modify valid
stelin Sep 3, 2023
de30b87
:zap:add
stelin Sep 4, 2023
203c759
:bug:fixed once second
stelin Sep 4, 2023
0ee7b59
:bug:fixed bug
stelin Sep 4, 2023
6cd90bb
:zap:modify function name
stelin Sep 4, 2023
c1ddadd
:zap:check style
stelin Sep 5, 2023
0b966a1
Merge branch 'main' of github.com:open-job/openjob into 1.x
stelin Sep 5, 2023
35cd8c4
:zap:add fixed rate
stelin Sep 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion openjob-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>openjob</artifactId>
<groupId>io.openjob</groupId>
<version>1.0.6</version>
<version>1.0.7</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>openjob-common</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package io.openjob.common.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
* @author stelin [email protected]
* @since 1.0.7
*/
@Getter
@AllArgsConstructor
public enum HttpMethodEnum {
/**
* GET
*/
FORM("GET"),

/**
* POST
*/
JSON("POST"),
;

private final String type;
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ public enum InstanceStatusEnum {
private final Integer status;
private final String message;

/**
* Complete status.
*/
public static final List<Integer> COMPLETE = Arrays.asList(
SUCCESS.getStatus(),
FAIL.getStatus(),
STOP.getStatus(),
CANCEL.getStatus()
);

/**
* Not complete status.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public class LogFieldConstant {

public static final String JOB_INSTANCE_TASK_ID = "job_instance_task_id";

public static final String JOB_DISPATCH_VERSION = "job_dispatch_version";

public static final String TASK_ID = "job_instance_taskId";

public static final String CIRCLE_ID = "circle_id";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package io.openjob.common.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
* @author stelin [email protected]
* @since 1.0.7
*/
@AllArgsConstructor
@Getter
public enum MediaTypeEnum {
/**
* Form
*/
FORM("application/x-www-form-urlencoded"),

/**
* JSON
*/
JSON("application/json"),
;

private final String type;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package io.openjob.common.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
* @author stelin [email protected]
* @since 1.0.7
*/
@Getter
@AllArgsConstructor
public enum RequestTypeEnum {
/**
* Server
*/
SERVER("server"),

/**
* Agent
*/
AGENT("agent"),
;

private final String type;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
package io.openjob.common.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
* @author stelin [email protected]
* @since 1.0.7
*/
@Getter
@AllArgsConstructor
public enum ResponseModeEnum {
/**
* Http status
*/
HTTP_STATUS("status"),

/**
* Json
*/
HTTP_JSON("json"),

/**
* String
*/
HTTP_STRING("string"),
;

private final String mode;

/**
* Whether is status
*
* @param mode mode
* @return Boolean
*/
public static Boolean isStatus(String mode) {
return HTTP_STATUS.getMode().equals(mode);
}

/**
* Whether is json
*
* @param mode mode
* @return Boolean
*/
public static Boolean isJson(String mode) {
return HTTP_JSON.getMode().equals(mode);
}

/**
* Whether is string
*
* @param mode mode
* @return Boolean
*/
public static Boolean isString(String mode) {
return HTTP_STRING.getMode().equals(mode);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,34 @@
* @since 1.0.0
*/
public class TaskConstant {
public static final String REDUCE_PARENT_TASK_NAME = "reduce";

/**
* MR root task name
*/
public static final String MAP_TASK_ROOT_NAME = "MR_TASK_ROOT";

/**
* MR reduce task name
*/
public static final String MAP_TASK_REDUCE_NAME = "MR_TASK_REDUCE";

/**
* Broadcast task name
*/
public static final String BROADCAST_NAME = "BROADCAST";

/**
* Sharding task name
*/
public static final String SHARDING_NAME = "SHARDING";

/**
* Default parent task id
*/
public static final String DEFAULT_PARENT_ID = "0_0_0_0_0";

/**
* Default circle id
*/
public static final Long DEFAULT_CIRCLE_ID = 1L;
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ public static Boolean isCron(String type) {
return CRON.getType().equals(type);
}

public static Boolean isFixedRate(String type) {
return FIXED_RATE.getType().equals(type);
}

public static Boolean isSecondDelay(String type) {
return SECOND_DELAY.getType().equals(type);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
package io.openjob.common.dto;

import io.openjob.common.constant.HttpMethodEnum;
import io.openjob.common.constant.MediaTypeEnum;
import io.openjob.common.constant.RequestTypeEnum;
import io.openjob.common.constant.ResponseModeEnum;
import lombok.Data;

/**
* @author stelin [email protected]
* @since 1.0.7
*/
@Data
public class HttpProcessorDTO {

/**
* Http url
*/
private String url;

/**
* Http method
*
* @see HttpMethodEnum#getType()
*/
private String method;

/**
* Timeout(ms)
*/
private Long timeout;

/**
* Content Type
*
* @see MediaTypeEnum#getType()
*/
private String contentType;

/**
* Body
*/
private String body;

/**
* Cookie
*/
private String cookie;

/**
* Response mode
*
* @see ResponseModeEnum#getMode()
*/
private String responseMode;

/**
* JSON => key
*/
private String key;

/**
* JSON => value or string
*/
private String value;

/**
* Request type
*
* @see RequestTypeEnum#getType()
*/
private String requestType;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package io.openjob.common.request;

import lombok.Data;

import java.io.Serializable;

/**
* Second delay to pull the child instance task by task id
*
* @author stelin [email protected]
* @since 1.0.7
*/
@Data
public class ServerInstanceTaskChildListPullRequest implements Serializable {

/**
* Job instance id
*/
private Long jobInstanceId;

/**
* Job dispatch version
*/
private Long dispatchVersion;

/**
* Circle id
*/
private Long circleId;

/**
* Task id
*/
private String taskId;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package io.openjob.common.request;

import lombok.Data;

import java.io.Serializable;

/**
* Second delay to pull the latest instance task
*
* @author stelin [email protected]
* @since 1.0.7
*/
@Data
public class ServerInstanceTaskListPullRequest implements Serializable {

/**
* Job instance id
*/
private Long jobInstanceId;

/**
* Job dispatch version
*/
private Long dispatchVersion;

/**
* Circle id
*/
private Long circleId;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package io.openjob.common.request;

import lombok.Data;

import java.io.Serializable;

/**
* @author stelin [email protected]
* @since 1.0.7
*/
@Data
public class ServerStopInstanceTaskRequest implements Serializable {
/**
* Job instance id
*/
private Long jobInstanceId;

/**
* Job dispatch version
*/
private Long dispatchVersion;

/**
* Circle id
*/
private Long circleId;

/**
* Task id
*/
private String taskId;
}
Loading