Merge watcher job-runner into base job-runner (#260)

This commit is contained in:
prathamesh0
2022-11-24 16:26:40 +05:30
committed by GitHub
parent aba0c665f3
commit 590482ee53
11 changed files with 58 additions and 67 deletions
+2 -1
View File
@@ -49,7 +49,8 @@ export class ExportStateCmd {
}
async init (
Database: new (config: ConnectionOptions,
Database: new (
config: ConnectionOptions,
serverConfig?: ServerConfig
) => DatabaseInterface,
Indexer: new (
+2 -1
View File
@@ -57,7 +57,8 @@ export class FillCmd {
}
async init (
Database: new (config: ConnectionOptions,
Database: new (
config: ConnectionOptions,
serverConfig?: ServerConfig
) => DatabaseInterface,
Indexer: new (
+2 -1
View File
@@ -52,7 +52,8 @@ export class ImportStateCmd {
}
async init (
Database: new (config: ConnectionOptions,
Database: new (
config: ConnectionOptions,
serverConfig?: ServerConfig
) => DatabaseInterface,
Indexer: new (
+5 -4
View File
@@ -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);
}
+2 -1
View File
@@ -50,7 +50,8 @@ export class ServerCmd {
}
async init (
Database: new (config: ConnectionOptions,
Database: new (
config: ConnectionOptions,
serverConfig?: ServerConfig
) => DatabaseInterface,
Indexer: new (