mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-18 17:25:16 -04:00
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:
parent
3f87539d7d
commit
d89cf23fdd
1 changed files with 2 additions and 12 deletions
|
@ -1,17 +1,7 @@
|
||||||
import { ChildProcess } from 'child_process'
|
import { ChildProcess } from 'child_process'
|
||||||
|
|
||||||
import Sequelize from 'sequelize'
|
import Sequelize from 'sequelize'
|
||||||
import {
|
import { BelongsTo, Column, DataType, Default, ForeignKey, Model, PrimaryKey, Table } from 'sequelize-typescript'
|
||||||
BelongsTo,
|
|
||||||
Column,
|
|
||||||
DataType,
|
|
||||||
Default,
|
|
||||||
ForeignKey,
|
|
||||||
IsUUID,
|
|
||||||
Model,
|
|
||||||
PrimaryKey,
|
|
||||||
Table
|
|
||||||
} from 'sequelize-typescript'
|
|
||||||
// core
|
// core
|
||||||
import { logger } from '../logger'
|
import { logger } from '../logger'
|
||||||
import { processData, stripNullByte } from '../utils'
|
import { processData, stripNullByte } from '../utils'
|
||||||
|
@ -61,7 +51,7 @@ function createDmpWorker (): ChildProcess {
|
||||||
let dmpWorker: ChildProcess = createDmpWorker()
|
let dmpWorker: ChildProcess = createDmpWorker()
|
||||||
|
|
||||||
function sendDmpWorker (data, callback): void {
|
function sendDmpWorker (data, callback): void {
|
||||||
if (!dmpWorker?.connected) {
|
if (!dmpWorker) {
|
||||||
dmpWorker = createDmpWorker()
|
dmpWorker = createDmpWorker()
|
||||||
}
|
}
|
||||||
const cacheKey = Date.now() + '_' + shortId.generate()
|
const cacheKey = Date.now() + '_' + shortId.generate()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue