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

feat(engine, engine-rest-core) Add a query criteria to retrieve all executing jobs #4494

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
feat(engine, engine-rest-core) take out 'active' filter from acquired…
… filter's logic

related to: #4470
  • Loading branch information
prajwolbhandari1 committed Jan 30, 2025
commit 560e2633b2389f5f6f26afba83c43651f0624327
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
"acquired": {
"type": "boolean",
"desc": "Only select jobs which are acquired, i.e., lock expiration date is not null, lock expiration
date is in future and suspension state is 1. Value may only be `true`, as `false` is the default
date is in future. Value may only be `true`, as `false` is the default
behavior."
}
}>
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public interface JobQuery extends Query<JobQuery, Job> {

/**
* Only select jobs that are currently being acquired,
* ie. lock expiration time is not null, lock expiration is in future and suspension state is 1
* ie. lock expiration time is not null, lock expiration is in future
*/
JobQuery acquired();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,11 +420,9 @@
and RES.SUSPENSION_STATE_ = #{suspensionState.stateCode}
</if>
<if test="acquired">
AND
RES.SUSPENSION_STATE_ = 1
AND
and
RES.LOCK_EXP_TIME_ IS NOT NULL
AND
and
RES.LOCK_EXP_TIME_ > #{now, jdbcType=TIMESTAMP}
</if>
<if test="isTenantIdSet">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Job.get = function(id, done) {
* @param {String} [params.firstResult] Pagination of results. Specifies the index of the first result to return.
* @param {String} [params.maxResults] Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left.
* @param {Bool} [params.acquired] Select jobs which are acquired, ie. lock expiration time is not
* null,lock expiration is in future and suspension state is 1
* null,lock expiration is in future
* @param {Function} done
*/
Job.list = function(params, done) {
Expand Down