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 Dec 2, 2024
1 parent b6bed8c commit 74a60ab
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 msg) { taskCompleted(task); }
}

0 comments on commit 74a60ab

Please sign in to comment.