Skip to content

Commit

Permalink
Merge pull request #643 from PradyumnaNagendra/SB-14472
Browse files Browse the repository at this point in the history
Issue #SB-14472 fix: Batch Status Update and batch count update fix
maheshkumargangula authored Aug 27, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 3280a07 + 8086c3d commit 0ea8bc7
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion platform-jobs/samza/course-batch-updater/pom.xml
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
<scala.version>2.11</scala.version>
<hadoop.version>2.6.2</hadoop.version>
</properties>
<version>0.0.15</version>
<version>0.0.16</version>
<dependencies>
<dependency>
<groupId>org.ekstep</groupId>
Original file line number Diff line number Diff line change
@@ -54,8 +54,8 @@ private void updateBatchCount(String courseId) throws Exception {
// SystemUpdate batch count
Request request = new Request();
request.put("content", new HashMap<String, Object>() {{
put("c_" + installation + "_open_batch_count".toLowerCase(), openBatchCount[0]);
put("c_" + installation + "_private_batch_count".toLowerCase(), privateBatchCount[0]);
put("c_" + installation.toLowerCase() + "_open_batch_count".toLowerCase(), openBatchCount[0]);
put("c_" + installation.toLowerCase() + "_private_batch_count".toLowerCase(), privateBatchCount[0]);
}});
systemUpdate(courseId, request);
}
Original file line number Diff line number Diff line change
@@ -75,7 +75,7 @@ public static void updateCompletedBatch(MessageCollector collector) {
for (Row row : rows) {
if (StringUtils.isNotBlank(row.getString("enddate"))) {
Date startDate = format.parse(row.getString("enddate"));
if (currentDate.compareTo(startDate) >= 0) {
if (currentDate.compareTo(startDate) > 0) {
batchIds.add(row.getString("batchid"));
Map<String, Object> event = getBatchStatusEvent(row.getString("batchid"), row.getString("courseid"), 2);
collector.send(new OutgoingMessageEnvelope(new SystemStream("kafka", topic), event));
2 changes: 1 addition & 1 deletion platform-jobs/samza/distribution/pom.xml
Original file line number Diff line number Diff line change
@@ -67,7 +67,7 @@
<dependency>
<groupId>org.ekstep</groupId>
<artifactId>course-batch-updater</artifactId>
<version>0.0.15</version>
<version>0.0.16</version>
<type>tar.gz</type>
<classifier>distribution</classifier>
</dependency>

0 comments on commit 0ea8bc7

Please sign in to comment.