You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by dp...@apache.org on 2019/01/09 18:23:27 UTC
[ignite-teamcity-bot] branch ignite-gg-14609 updated:
IGNITE-GG-14609: Correct scheduler task name
This is an automated email from the ASF dual-hosted git repository.
dpavlov pushed a commit to branch ignite-gg-14609
in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git
The following commit(s) were added to refs/heads/ignite-gg-14609 by this push:
new 7029f37 IGNITE-GG-14609: Correct scheduler task name
7029f37 is described below
commit 7029f375e0d708f0089f654494a55b2b6a053eb5
Author: Dmitriy Pavlov <dp...@apache.org>
AuthorDate: Wed Jan 9 21:23:24 2019 +0300
IGNITE-GG-14609: Correct scheduler task name
---
.../ci/github/ignited/GitHubConnIgnitedImpl.java | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/ignited/GitHubConnIgnitedImpl.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/ignited/GitHubConnIgnitedImpl.java
index 29a85a1..da8bc03 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/ignited/GitHubConnIgnitedImpl.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/ignited/GitHubConnIgnitedImpl.java
@@ -36,6 +36,8 @@ import org.apache.ignite.ci.di.MonitoredTask;
import org.apache.ignite.ci.di.scheduler.IScheduler;
import org.apache.ignite.ci.github.PullRequest;
import org.apache.ignite.ci.github.pure.IGitHubConnection;
+import org.apache.ignite.ci.teamcity.ignited.ITeamcityIgnited;
+import org.jetbrains.annotations.NotNull;
/**
*
@@ -81,8 +83,7 @@ class GitHubConnIgnitedImpl implements IGitHubConnIgnited {
/** {@inheritDoc} */
@AutoProfiling
@Override public List<PullRequest> getPullRequests() {
- scheduler.sheduleNamed(IGitHubConnIgnited.class.getSimpleName() + ".actualizePrs",
- this::actualizePrs, 2, TimeUnit.MINUTES);
+ scheduler.sheduleNamed(taskName("actualizePrs"), this::actualizePrs, 2, TimeUnit.MINUTES);
return StreamSupport.stream(prCache.spliterator(), false)
.filter(entry -> entry.getKey() >> 32 == srvIdMaskHigh)
@@ -91,6 +92,16 @@ class GitHubConnIgnitedImpl implements IGitHubConnIgnited {
.collect(Collectors.toList());
}
+ /**
+ * @param taskName Task name.
+ * @return Task name concatenated with server name.
+ */
+ @NotNull
+ private String taskName(String taskName) {
+ return IGitHubConnIgnited.class.getSimpleName() + "." + taskName + "." + srvId;
+ }
+
+
private void actualizePrs() {
runActualizePrs(srvId, false);
@@ -102,8 +113,7 @@ class GitHubConnIgnitedImpl implements IGitHubConnIgnited {
*
*/
private void sheduleResync() {
- scheduler.sheduleNamed(IGitHubConnIgnited.class.getSimpleName() + ".fullReindex",
- this::fullReindex, 60, TimeUnit.MINUTES);
+ scheduler.sheduleNamed(taskName("fullReindex"), this::fullReindex, 60, TimeUnit.MINUTES);
}
/**