cleaning stream copy
This commit is contained in:
parent
6a9e7d7c14
commit
b63806f8de
@ -1,10 +1,6 @@
|
||||
const zlib = require('zlib');
|
||||
const PSQL = require('cartodb-psql');
|
||||
const copyTo = require('pg-copy-streams').to;
|
||||
const copyFrom = require('pg-copy-streams').from;
|
||||
const StreamCopyMetrics = require('./stream_copy_metrics');
|
||||
const { Client } = require('pg');
|
||||
const Logger = require('./logger');
|
||||
|
||||
module.exports = {
|
||||
to(sql, userDbParams, cb, next) {
|
||||
@ -21,9 +17,9 @@ module.exports = {
|
||||
.on('end', () => {
|
||||
done();
|
||||
next(null, copyToStream.rowCount);
|
||||
})
|
||||
});
|
||||
|
||||
cb(null, pgstream, client, done)
|
||||
cb(null, pgstream, client, done);
|
||||
});
|
||||
},
|
||||
|
||||
@ -47,7 +43,7 @@ module.exports = {
|
||||
next(null, copyFromStream.rowCount);
|
||||
});
|
||||
|
||||
cb(null, pgstream, client, done)
|
||||
cb(null, pgstream, client, done);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user