Resume state saving

This commit is contained in:
Richard Patel
2019-02-03 15:54:02 +01:00
parent 0b20823ae1
commit c6d7fad8e8
5 changed files with 147 additions and 27 deletions

View File

@@ -3,7 +3,6 @@ package main
import (
"github.com/terorie/od-database-crawler/ds/redblackhash"
"github.com/terorie/od-database-crawler/fasturl"
"sync"
"time"
)
@@ -30,18 +29,19 @@ type Job struct {
}
type OD struct {
Task Task
Result TaskResult
Wait sync.WaitGroup
BaseUri fasturl.URL
WCtx WorkerContext
Scanned redblackhash.Tree
Task Task
Result TaskResult
InProgress int64
BaseUri fasturl.URL
WCtx WorkerContext
Scanned redblackhash.Tree
}
type PausedOD struct {
Task *Task
Result *TaskResult
BaseUri *fasturl.URL
Task *Task
Result *TaskResult
BaseUri *fasturl.URL
InProgress int64
}
type File struct {