You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by bh...@apache.org on 2019/07/08 09:29:04 UTC
[incubator-dlab] branch feature/projects updated: DLAB-849 fixed
bug connected with resource scheduler
This is an automated email from the ASF dual-hosted git repository.
bhliva pushed a commit to branch feature/projects
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/feature/projects by this push:
new 4e44963 DLAB-849 fixed bug connected with resource scheduler
4e44963 is described below
commit 4e44963a9f2c1be7f4c2540d5b92f409fc59f33b
Author: bhliva <bo...@epam.com>
AuthorDate: Mon Jul 8 12:28:54 2019 +0300
DLAB-849 fixed bug connected with resource scheduler
---
.../com/epam/dlab/backendapi/dao/SchedulerJobDAO.java | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/SchedulerJobDAO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/SchedulerJobDAO.java
index 99f6b1b..597d0f9 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/SchedulerJobDAO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/SchedulerJobDAO.java
@@ -131,11 +131,13 @@ public class SchedulerJobDAO extends BaseDAO {
and(
eq(STATUS, status.toString()),
schedulerNotNullCondition(),
- eq(CONSIDER_INACTIVITY_FLAG, true),
- or(eq(COMPUTATIONAL_RESOURCES, Collections.emptyList()),
- and(ne(COMPUTATIONAL_RESOURCES, Collections.emptyList()),
- Filters.elemMatch(COMPUTATIONAL_RESOURCES,
- lte(LAST_ACTIVITY, lastActivity))))
+ or(and(eq(CONSIDER_INACTIVITY_FLAG, true),
+ or(eq(COMPUTATIONAL_RESOURCES, Collections.emptyList()),
+ and(ne(COMPUTATIONAL_RESOURCES, Collections.emptyList()),
+ Filters.elemMatch(COMPUTATIONAL_RESOURCES,
+ lte(LAST_ACTIVITY, lastActivity))))),
+ eq(CONSIDER_INACTIVITY_FLAG, false)
+ )
),
fields(excludeId(), include(USER, EXPLORATORY_NAME, SCHEDULER_DATA))))
.map(d -> convertFromDocument(d, SchedulerJobData.class))
@@ -159,9 +161,11 @@ public class SchedulerJobDAO extends BaseDAO {
.collect(toList());
}
- public List<SchedulerJobData> getComputationalSchedulerDataWithOneOfStatus(UserInstanceStatus exploratoryStatus, UserInstanceStatus... statuses) {
+ public List<SchedulerJobData> getComputationalSchedulerDataWithOneOfStatus(UserInstanceStatus exploratoryStatus,
+ UserInstanceStatus... statuses) {
return stream(computationalResourcesWithScheduler(exploratoryStatus))
- .map(doc -> computationalSchedulerData(doc, statuses).map(compResource -> toSchedulerData(doc, compResource)))
+ .map(doc -> computationalSchedulerData(doc, statuses).map(compResource -> toSchedulerData(doc,
+ compResource)))
.flatMap(Function.identity())
.collect(toList());
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org