-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[HWKMETRICS-153] adding endpoint for fetching rates
The bulk of the changes/effort for this commit were for initializing the task scheduling service and getting a test in place. There is still work to be done with the task service initialization, but this is a good first step.
- Loading branch information
John Sanda
committed
Jun 22, 2015
1 parent
7592167
commit c43751a
Showing
6 changed files
with
102 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -137,6 +137,7 @@ public TaskServiceImpl(RxSession session, Queries queries, LeaseService leaseSer | |
* </p> | ||
*/ | ||
public void setTimeUnit(TimeUnit timeUnit) { | ||
logger.info("Using time unit of {}", timeUnit); | ||
switch (timeUnit) { | ||
case SECONDS: | ||
this.timeUnit = TimeUnit.SECONDS; | ||
|
@@ -190,6 +191,7 @@ public Subscription subscribe(TaskType taskType, final Action1<? super Task> onN | |
return subject.subscribe(onNext, onError, onComplete); | ||
} | ||
|
||
@Override | ||
public Subscription subscribe(TaskType taskType, Action1<? super Task> onNext) { | ||
PublishSubject<Task> subject = subjects.get(taskType); | ||
if (subject == null) { | ||
|
@@ -316,6 +318,8 @@ void executeTasks(DateTime timeSlice) { | |
* @param taskType | ||
*/ | ||
private void executeTasks(DateTime timeSlice, TaskType taskType) { | ||
logger.info("Executing tasks for time slice {}", timeSlice); | ||
This comment has been minimized.
Sorry, something went wrong.
tsegismont
Contributor
|
||
|
||
// I know, I know. We should not have to used CountDownLatch with RxJava. It is | ||
// left over from the original implementation and was/is used to ensure tasks of | ||
// one type finish executing before we start executing tasks of the next type. | ||
|
2 comments
on commit c43751a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that should definitely be debug or trace. Can you go ahead and make the change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in master
Could you add Javadoc for this one?