Skip to content

Commit

Permalink
Fix generationProcess link in preview
Browse files Browse the repository at this point in the history
  • Loading branch information
olovy committed Nov 11, 2024
1 parent d8b44cc commit 9eee4e2
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.Consumer;

import static whelk.Document.HASH_IT;
import static whelk.datatool.bulkchange.BulkJobDocument.JOB_TYPE;
import static whelk.datatool.bulkchange.BulkJobDocument.Status.Completed;
import static whelk.datatool.bulkchange.BulkJobDocument.Status.Failed;
Expand Down Expand Up @@ -79,7 +80,11 @@ protected void printScriptLogHeader(WhelkTool tool, BulkJobDocument jobDoc) {
}

protected WhelkTool buildWhelkTool(BulkJobDocument jobDoc) throws IOException {
Script script = jobDoc.getSpecification().getScript(id);

// FIXME handle bulk job thing vs record id consistently
var bulkJobThingId = stripPrefix(id, HASH_IT) + HASH_IT;

Script script = jobDoc.getSpecification().getScript(bulkJobThingId);
WhelkTool tool = new WhelkTool(whelk, script, reportDir(systemId), WhelkTool.getDEFAULT_STATS_NUM_IDS());
// TODO for now setting changedBy only works for loud changes (!minorChange in PostgreSQLComponent)
tool.setDefaultChangedBy(jobDoc.getChangeAgentId());
Expand Down

0 comments on commit 9eee4e2

Please sign in to comment.