Skip to content

Commit

Permalink
0001627: Add a cancel load feature to the load screen
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed Apr 28, 2014
1 parent 8466b65 commit 0965773
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Expand Up @@ -45,6 +45,8 @@ public interface IOutgoingBatchService {

public OutgoingBatches getOutgoingBatchRange(long startBatchId, long endBatchId);

public int cancelLoadBatches(long loadId);

public OutgoingBatches getOutgoingBatchRange(String nodeId, Date startDate, Date endDate, String... channels);

public OutgoingBatches getOutgoingBatchErrors(int maxRows);
Expand Down
Expand Up @@ -84,6 +84,11 @@ public OutgoingBatchService(IParameterService parameterService,
setSqlMap(new OutgoingBatchServiceSqlMap(symmetricDialect.getPlatform(),
createSqlReplacementTokens()));
}

@Override
public int cancelLoadBatches(long loadId) {
return sqlTemplate.update(getSql("cancelLoadBatchesSql"), loadId);
}

public void markAllAsSentForNode(String nodeId, boolean includeConfigChannel) {
OutgoingBatches batches = null;
Expand Down
Expand Up @@ -37,6 +37,8 @@ public OutgoingBatchServiceSqlMap(IDatabasePlatform platform, Map<String, String

putSql("selectCountBatchesPrefixSql" ,"" +
"select count(*) from $(outgoing_batch) " );

putSql("cancelLoadBatchesSql", "update $(outgoing_batch) set ignore_count=1, status='OK' where load_id=?");

putSql("insertOutgoingBatchSql" ,"" +
"insert into $(outgoing_batch) " +
Expand Down

0 comments on commit 0965773

Please sign in to comment.