Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions addOns/spider/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed
- Handle persistence errors and forced shutdown in automation job.
- Address memory leak.

## [0.18.0] - 2025-12-15
### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,13 @@ public class SpiderTask implements Runnable {
*/
private HistoryReference reference;

/** The spider resource found. */
private SpiderResourceFound resourceFound;

private ExtensionHistory extHistory;

/** The Constant log. */
private static final Logger LOGGER = LogManager.getLogger(SpiderTask.class);

private final int depth;

/**
* Instantiates a new spider task using the target URI. The purpose of this task is to crawl the
* given uri, using the provided method and supplied request headers, find any other uris in the
Expand All @@ -99,7 +98,7 @@ public class SpiderTask implements Runnable {
public SpiderTask(Spider parent, SpiderResourceFound resourceFound, URI uri) {
super();
this.parent = parent;
this.resourceFound = resourceFound;
this.depth = resourceFound.getDepth();

LOGGER.debug("New task submitted for uri: {}", uri);

Expand Down Expand Up @@ -151,7 +150,7 @@ public void run() {

LOGGER.debug(
"Spider Task Started. Processing uri at depth {} using already constructed message: {}",
resourceFound.getDepth(),
depth,
reference.getURI());

runImpl();
Expand Down Expand Up @@ -234,9 +233,9 @@ private void runImpl() {
parent.checkPauseAndWait();

int maxDepth = parent.getSpiderParam().getMaxDepth();
if (maxDepth == SpiderParam.UNLIMITED_DEPTH || resourceFound.getDepth() < maxDepth) {
if (maxDepth == SpiderParam.UNLIMITED_DEPTH || depth < maxDepth) {
parent.notifyListenersSpiderTaskResult(new SpiderTaskResult(msg));
processResource(parent, resourceFound.getDepth(), msg);
processResource(parent, depth, msg);
} else {
parent.notifyListenersSpiderTaskResult(
new SpiderTaskResult(msg, getSkippedMessage("maxdepth")));
Expand Down
Loading