Skip to content

Commit

Permalink
fix(core): 🐛 fix task update
Browse files Browse the repository at this point in the history
  • Loading branch information
SCadilhac committed Sep 19, 2024
1 parent 51e91b5 commit 58adae0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/onl/netfishers/netshot/TaskManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ public static void cancelTask(Task task, String reason) throws SchedulerExceptio
task.onCancel();
task.setCancelled();
task.warn(reason);
session.persist(task);
session.merge(task);
session.getTransaction().commit();
log.trace("Task successfully cancelled.");
}
Expand Down Expand Up @@ -503,7 +503,7 @@ public static void reassignOrphanTasks() {
log.debug("Task {} will be reassigned as its previously assigned runner {} has disappeared.",
task.getId(), task.getRunnerId());
assignTaskRunner(task);
session.persist(task);
session.merge(task);
reassignedCount += 1;
}
session.getTransaction().commit();
Expand Down

0 comments on commit 58adae0

Please sign in to comment.