Skip to content

Commit

Permalink
Merge branch 'main' into noop-function
Browse files Browse the repository at this point in the history
  • Loading branch information
martinst06 authored Dec 16, 2024
2 parents 2b0d015 + 716c0e9 commit 056e1eb
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [1.45.1](https://github.com/adobe/spacecat-audit-worker/compare/v1.45.0...v1.45.1) (2024-12-16)


### Bug Fixes

* **site-detection:** extra logs ([1522d69](https://github.com/adobe/spacecat-audit-worker/commit/1522d69a868605b0c4953e953c2360b80fb4aa24))

# [1.45.0](https://github.com/adobe/spacecat-audit-worker/compare/v1.44.0...v1.45.0) (2024-12-16)


Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@adobe/spacecat-audit-worker",
"version": "1.45.0",
"version": "1.45.1",
"description": "SpaceCat Audit Worker",
"main": "src/index.js",
"type": "module",
Expand Down
7 changes: 4 additions & 3 deletions src/site-detection/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,17 +180,18 @@ export async function siteDetectionRunner(_, context) {
.map((s) => s.getBaseURL())
.map((url) => url.replace(/^https?:\/\//, '')));

let candidates = await fetchCandidates(authorization, log);
const unfilteredCandidates = await fetchCandidates(authorization, log);

candidates = candidates
const candidates = unfilteredCandidates
.filter((candidate) => !knownHosts.has(candidate.domain))
.filter((candidate) => isValidCandidate(config, candidate.domain, log));

log.info(`Found ${candidates.length} valid candidates`);
log.info(`Out of ${unfilteredCandidates.length} candidates, found ${candidates.length} valid candidates`);

// TODO: replace the HOOK call with a proper post-processing step
for (const candidate of candidates) {
try {
log.info(`Re-feeding ${candidate.domain}; x-fw: ${candidate.xFwHost}, v: ${candidate.hlxVersion}`);
// eslint-disable-next-line no-await-in-loop
await refeed(candidate.xFwHost, candidate.hlxVersion, siteDetectionWebHook);
} catch (e) {
Expand Down

0 comments on commit 056e1eb

Please sign in to comment.