Skip to content

Commit

Permalink
RESTful service to reschedule diff task(s) #1386
Browse files Browse the repository at this point in the history
  • Loading branch information
vrindanayak committed May 11, 2018
1 parent b53a257 commit a6a6a9c
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -297,13 +297,13 @@ public Response rescheduleDiffTasks() {
ArchiveDeviceExtension arcDev = device.getDeviceExtension(ArchiveDeviceExtension.class);
int fetchSize = arcDev.getQueueTasksFetchSize();
int count = 0;
List<Long> retrieveTaskPks;
List<Long> diffTaskPks;
do {
retrieveTaskPks = diffService.getDiffTaskPks(matchQueueMessage, matchDiffTask, fetchSize);
for (long pk : retrieveTaskPks)
diffTaskPks = diffService.getDiffTaskPks(matchQueueMessage, matchDiffTask, fetchSize);
for (long pk : diffTaskPks)
diffService.rescheduleDiffTask(pk, null);
count += retrieveTaskPks.size();
} while (retrieveTaskPks.size() >= fetchSize);
count += diffTaskPks.size();
} while (diffTaskPks.size() >= fetchSize);
queueEvent.setCount(count);
return count(count);
} catch (IllegalTaskStateException|DifferentDeviceException e) {
Expand Down

0 comments on commit a6a6a9c

Please sign in to comment.