Skip to content

Commit

Permalink
improve message
Browse files Browse the repository at this point in the history
  • Loading branch information
terrywbrady committed Aug 16, 2024
1 parent 0a3c95e commit 6dd0f6b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/cdlib/mrt/zk/Access.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public static Access createAssembly(ZooKeeper client, Queues queueName, JSONObje

public void delete(ZooKeeper client) throws MerrittStateError, MerrittZKNodeInvalid, KeeperException, InterruptedException {
if (!this.status().isDeletable()) {
throw new MerrittStateError(String.format("Delete invalid for %s", path()));
throw new MerrittStateError(String.format("Delete invalid for %s (%s)", path(), this.status().name()));
}
QueueItemHelper.deleteAll(client, path());
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/cdlib/mrt/zk/Batch.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public static Batch createBatch(ZooKeeper client, JSONObject submission) throws
public void delete(ZooKeeper client) throws MerrittStateError, MerrittZKNodeInvalid, KeeperException, InterruptedException {
String[] dirs = {BatchJobStates.Processing.path, BatchJobStates.Failed.path, BatchJobStates.Completed.path};
if (!this.status().isDeletable()) {
throw new MerrittStateError(String.format("Delete invalid for %s", path()));
throw new MerrittStateError(String.format("Delete invalid for %s (%s)", path(), this.status().name()));
}
for(String state: dirs) {
String p = String.format("%s/states/%s", path(), state);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/cdlib/mrt/zk/Job.java
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ public void setJobStatePath(ZooKeeper client) throws MerrittZKNodeInvalid, Inter

public void delete(ZooKeeper client) throws MerrittStateError, MerrittZKNodeInvalid, InterruptedException, KeeperException {
if (!this.status().isDeletable()) {
throw new MerrittStateError(String.format("Delete invalid for %s", path()));
throw new MerrittStateError(String.format("Delete invalid for %s (%s)", path(), this.status().name()));
}
QueueItemHelper.delete(client, jobStatePath());
QueueItemHelper.delete(client, batchStatePath());
Expand Down

0 comments on commit 6dd0f6b

Please sign in to comment.