Skip to content

Commit

Permalink
status: fix typo setting status to log message (#379)
Browse files Browse the repository at this point in the history
status should be set to 'done'!
  • Loading branch information
ikreymer authored Sep 14, 2023
1 parent a3cfc55 commit afecec0
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions crawler.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,11 +311,14 @@ export class Crawler {
await this.crawl();
const finished = await this.crawlState.isFinished();
const stopped = await this.crawlState.isCrawlStopped();
if (stopped) {
status = "crawl gracefully stopped";
} else if (this.interrupted && !finished) {
status = "interrupted";
exitCode = 11;
if (!finished) {
if (stopped) {
status = "done";
logger.info("Crawl gracefully stopped on request");
} else if (this.interrupted) {
status = "interrupted";
exitCode = 11;
}
}
} catch(e) {
logger.error("Crawl failed", e);
Expand Down

0 comments on commit afecec0

Please sign in to comment.