@axetroy/crawler
Options
All
Public
Public/Protected
All
Inherited
Only exported
Menu
Persistence
constructor
Crawler
Dir
Path
Task
File
Path
load
sync
Hierarchy
Persistence
Index
Constructors
constructor
Properties
Crawler
Dir
Path
Task
File
Path
Methods
load
sync
Constructors
constructor
new
Persistence
(
scheduler
:
Scheduler
)
:
Persistence
Parameters
scheduler:
Scheduler
Returns
Persistence
Properties
Crawler
Dir
Path
Crawler
Dir
Path
:
string
= path.join(process.cwd(), ".crawler")
Task
File
Path
Task
File
Path
:
string
= path.join(this.CrawlerDirPath, "task.json")
Methods
load
load
(
)
:
boolean
Load the last tasks from file
Returns
boolean
Whether load success or not
sync
sync
(
runningTasks
:
Task
[]
, pendingTasks
:
Task
[]
)
:
void
Sync current task to file
Parameters
runningTasks:
Task
[]
pendingTasks:
Task
[]
Returns
void
Load the last tasks from file