fix: a cancelled or timed-out crawl stores what it fetched and ends
The crawl job's context ends on a cancel or at the job timeout. Storing the pages, links and issues now runs on a context detached from it with its own 10-minute bound, a timeout ends the crawl failed with a time-limit error, a LoadLimits failure falls back to the defaults, and a fetch cut short by the cancellation is recorded as canceled.
This commit is contained in:
3
jobs.go
3
jobs.go
@@ -2,7 +2,6 @@ package seo
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"git.golem15.com/golem15/sm-seo-plugin/classes"
|
||||
"git.golem15.com/golem15/sm-seo-plugin/classes/crawl"
|
||||
@@ -16,7 +15,7 @@ import (
|
||||
func (p *Plugin) Jobs() []pact.Job {
|
||||
return []pact.Job{
|
||||
conga.Job(p.generateEntries, conga.MaxAttempts(3)),
|
||||
conga.Job(p.crawl, conga.MaxAttempts(1), conga.Timeout(6*time.Hour)),
|
||||
conga.Job(p.crawl, conga.MaxAttempts(1), conga.Timeout(crawl.JobTimeout)),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user