mirror of
https://github.com/cerc-io/watcher-ts
synced 2026-09-08 08:54:05 +00:00
Merge watcher job-runner into base job-runner (#260)
This commit is contained in:
@@ -49,7 +49,8 @@ export class ExportStateCmd {
|
||||
}
|
||||
|
||||
async init (
|
||||
Database: new (config: ConnectionOptions,
|
||||
Database: new (
|
||||
config: ConnectionOptions,
|
||||
serverConfig?: ServerConfig
|
||||
) => DatabaseInterface,
|
||||
Indexer: new (
|
||||
|
||||
@@ -57,7 +57,8 @@ export class FillCmd {
|
||||
}
|
||||
|
||||
async init (
|
||||
Database: new (config: ConnectionOptions,
|
||||
Database: new (
|
||||
config: ConnectionOptions,
|
||||
serverConfig?: ServerConfig
|
||||
) => DatabaseInterface,
|
||||
Indexer: new (
|
||||
|
||||
@@ -52,7 +52,8 @@ export class ImportStateCmd {
|
||||
}
|
||||
|
||||
async init (
|
||||
Database: new (config: ConnectionOptions,
|
||||
Database: new (
|
||||
config: ConnectionOptions,
|
||||
serverConfig?: ServerConfig
|
||||
) => DatabaseInterface,
|
||||
Indexer: new (
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
IndexerInterface,
|
||||
ServerConfig,
|
||||
Clients,
|
||||
WatcherJobRunner as JobRunner,
|
||||
JobRunner,
|
||||
startMetricsServer
|
||||
} from '@cerc-io/util';
|
||||
|
||||
@@ -51,7 +51,8 @@ export class JobRunnerCmd {
|
||||
}
|
||||
|
||||
async init (
|
||||
Database: new (config: ConnectionOptions,
|
||||
Database: new (
|
||||
config: ConnectionOptions,
|
||||
serverConfig?: ServerConfig
|
||||
) => DatabaseInterface,
|
||||
Indexer: new (
|
||||
@@ -87,10 +88,10 @@ export class JobRunnerCmd {
|
||||
const jobRunner = new JobRunner(config.jobQueue, indexer, jobQueue);
|
||||
|
||||
await jobRunner.jobQueue.deleteAllJobs();
|
||||
await jobRunner.baseJobRunner.resetToPrevIndexedBlock();
|
||||
await jobRunner.resetToPrevIndexedBlock();
|
||||
|
||||
await startJobRunner(jobRunner);
|
||||
jobRunner.baseJobRunner.handleShutdown();
|
||||
jobRunner.handleShutdown();
|
||||
|
||||
await startMetricsServer(config, indexer);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,8 @@ export class ServerCmd {
|
||||
}
|
||||
|
||||
async init (
|
||||
Database: new (config: ConnectionOptions,
|
||||
Database: new (
|
||||
config: ConnectionOptions,
|
||||
serverConfig?: ServerConfig
|
||||
) => DatabaseInterface,
|
||||
Indexer: new (
|
||||
|
||||
Reference in New Issue
Block a user