Skip to content

Commit

Permalink
fix ttl not work due to job not close tx
Browse files Browse the repository at this point in the history
Change-Id: Ic4a3bc11e67f92c88772149d5c304a2c1da0ec64
  • Loading branch information
zhoney committed Jan 12, 2021
1 parent 26ac664 commit 921efba
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ public V call() throws Exception {

@Override
protected void done() {
this.save();
try {
this.save();
} finally {
super.done();
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ public V call() throws Exception {

@Override
protected void done() {
this.save();
try {
this.save();
} finally {
super.done();
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,19 @@ public TaskCallable() {
}

protected void done() {
// Do nothing, subclasses may override this method
this.closeTx();
}

protected void cancelled() {
// Do nothing, subclasses may override this method
}

protected void closeTx() {
if (this.graph().tx().isOpen()) {
this.graph().tx().close();
}
}

public void setMinSaveInterval(long seconds) {
E.checkArgument(seconds > 0,
"Must set interval > 0, bug got '%s'", seconds);
Expand Down

0 comments on commit 921efba

Please sign in to comment.