Skip to content

Commit

Permalink
Solved #1409,Delete finished cmdlets to keep only Nnewest finished cm…
Browse files Browse the repository at this point in the history
…dlets
  • Loading branch information
tianlong12 committed Nov 20, 2017
1 parent 3410663 commit 83733b6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public void deleteKeepNewCmd (long num) {
List<Long> cids = jdbcTemplate.queryForList(queryCids, Long.class);
String deleteCids = StringUtils.join(cids, ",");
final String deleteCmd = "DELETE FROM " + TABLE_NAME
+ " WHERE state IN (" + finishedState + ") AND cid IN (?)";
+ " WHERE cid IN (?)";
jdbcTemplate.update(deleteCmd,deleteCids);
final String deleteActions = "DELETE FROM action WHERE cid IN (?)";
jdbcTemplate.update(deleteActions, deleteCids);
Expand Down

0 comments on commit 83733b6

Please sign in to comment.