Skip to content

Commit

Permalink
New completion signifier taskCompletedWithNote()
Browse files Browse the repository at this point in the history
  • Loading branch information
greenc-FNAL committed Nov 26, 2024
1 parent bcfa723 commit de724b4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions modules/dcache/src/main/java/org/dcache/pool/migration/Job.java
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,18 @@ public void taskCompleted(Task task) {
}
}

@Override
public void taskCompletedWithNote(Task task, String msg) {
_lock.lock();
try {
taskCompleted(task);

addNote(new Note(task.getId(), task.getPnfsId(), msg));
} finally {
_lock.unlock();
}
}

public Object messageArrived(CellMessage envelope, PoolMigrationJobCancelMessage message) {
DelayedReply reply = new DelayedReply();
_lock.lock();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ public interface TaskCompletionHandler {
* The task completed without error.
*/
void taskCompleted(Task task);
default void taskCompletedWithNote(Task task, String) { taskCompleted(task); }
}

0 comments on commit de724b4

Please sign in to comment.