Do not extend from EventEmitter
This commit is contained in:
parent
bd8e4be596
commit
37a079363a
@ -1,12 +1,9 @@
|
|||||||
const EventEmitter = require('events');
|
|
||||||
const PSQL = require('cartodb-psql');
|
const PSQL = require('cartodb-psql');
|
||||||
const copyTo = require('pg-copy-streams').to;
|
const copyTo = require('pg-copy-streams').to;
|
||||||
const copyFrom = require('pg-copy-streams').from;
|
const copyFrom = require('pg-copy-streams').from;
|
||||||
|
|
||||||
module.exports = class StreamCopy extends EventEmitter {
|
module.exports = class StreamCopy {
|
||||||
constructor (sql, userDbParams) {
|
constructor (sql, userDbParams) {
|
||||||
super();
|
|
||||||
|
|
||||||
this.pg = new PSQL(userDbParams);
|
this.pg = new PSQL(userDbParams);
|
||||||
this.sql = sql;
|
this.sql = sql;
|
||||||
this.connectionClosedByClient = false;
|
this.connectionClosedByClient = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user