Skip to content

Commit

Permalink
fix: always set task_data via JdbcCustomization method (#495)
Browse files Browse the repository at this point in the history
Fixes #452
  • Loading branch information
kagkarlsson committed May 30, 2024
1 parent 1ff9ff4 commit f243d5e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ public Instant replace(Execution toBeReplaced, SchedulableInstance newInstance)
ps.setInt(index++, 0); // consecutive_failures
jdbcCustomization.setInstant(ps, index++, newExecutionTime); // execution_time
// may cause datbase-specific problems, might have to use setNull instead
ps.setObject(index++, serializer.serialize(newData)); // task_data
jdbcCustomization.setTaskData(
ps, index++, serializer.serialize(newData)); // task_data
ps.setString(index++, toBeReplaced.taskInstance.getTaskName()); // task_name
ps.setString(index++, toBeReplaced.taskInstance.getId()); // task_instance
ps.setLong(index++, toBeReplaced.version); // version
Expand Down Expand Up @@ -485,7 +486,7 @@ private boolean rescheduleInternal(
if (newData != null) {
// may cause datbase-specific problems, might have to use setNull instead
// FIXLATER: optionally support bypassing serializer if byte[] already
ps.setObject(index++, serializer.serialize(newData.data));
jdbcCustomization.setTaskData(ps, index++, serializer.serialize(newData.data));
}
ps.setString(index++, execution.taskInstance.getTaskName());
ps.setString(index++, execution.taskInstance.getId());
Expand Down

0 comments on commit f243d5e

Please sign in to comment.