fix: error thrown on consecutive connector executions

Fixes #73
This commit is contained in:
Jovan Krunić
2020-11-10 15:38:42 +01:00
committed by Rainer Killinger
parent 18359fdab3
commit 2259da317a
3 changed files with 28 additions and 15 deletions

View File

@@ -24,6 +24,8 @@ import {MailQueue} from '../src/notification/mail-queue';
import {Bulk, BulkStorage} from '../src/storage/bulk-storage';
import getPort from 'get-port';
import {Database} from '../src/storage/database';
import {Elasticsearch} from '../src/storage/elasticsearch/elasticsearch';
import {v4} from 'uuid';
/**
* Adds routers and configures an (express) app
@@ -141,4 +143,4 @@ export const getTransport = (verified: boolean) => {
}
}
export const index = 'stapps_footype_foosource_foobar';
export const getIndex = (uid?: string) => `stapps_footype_foosource_${uid ? uid : Elasticsearch.getIndexUID(v4())}`;