revision.ts: Remove .connected from dmpWorker check in sendDmpWorker.

Why did it appear there? Nobody knows...

Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
David Mehren 2020-04-13 21:36:09 +02:00
parent 3f87539d7d
commit d89cf23fdd
No known key found for this signature in database
GPG key ID: 6017AF117F9756CB

View file

@ -1,17 +1,7 @@
import { ChildProcess } from 'child_process'
import Sequelize from 'sequelize'
import {
BelongsTo,
Column,
DataType,
Default,
ForeignKey,
IsUUID,
Model,
PrimaryKey,
Table
} from 'sequelize-typescript'
import { BelongsTo, Column, DataType, Default, ForeignKey, Model, PrimaryKey, Table } from 'sequelize-typescript'
// core
import { logger } from '../logger'
import { processData, stripNullByte } from '../utils'
@ -61,7 +51,7 @@ function createDmpWorker (): ChildProcess {
let dmpWorker: ChildProcess = createDmpWorker()
function sendDmpWorker (data, callback): void {
if (!dmpWorker?.connected) {
if (!dmpWorker) {
dmpWorker = createDmpWorker()
}
const cacheKey = Date.now() + '_' + shortId.generate()