Skip to content

Commit

Permalink
fix: store correct script revision after script reload from file (#3704)
Browse files Browse the repository at this point in the history
system #3703
  • Loading branch information
yurem committed Jan 27, 2023
1 parent 0dc14a0 commit 2ca6a83
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ private ReloadResult reloadCustomScriptConfigurations(
}

if (ScriptLocationType.FILE == newCustomScript.getLocationType()) {
// Replace script revision with file modification time. This should allow to
// Add to script revision file modification time. This should allow to
// reload script automatically after changing location_type
long fileModifiactionTime = getFileModificationTime(newCustomScript.getLocationPath());

Expand Down Expand Up @@ -258,10 +258,10 @@ private ReloadResult reloadCustomScriptConfigurations(
}

if (ScriptLocationType.FILE == loadedCustomScript.getLocationType()) {
// Replace script revision with file modification time. This should allow to
// Add to script revision file modification time. This should allow to
// reload script automatically after changing location_type
long fileModifiactionTime = getFileModificationTime(loadedCustomScript.getLocationPath());
loadedCustomScript.setRevision(fileModifiactionTime);
loadedCustomScript.setRevision(newCustomScript.getRevision() + fileModifiactionTime);

if (fileModifiactionTime != 0) {
String scriptFromFile = loadFromFile(loadedCustomScript.getLocationPath());
Expand Down

0 comments on commit 2ca6a83

Please sign in to comment.