diff --git a/app/services/stream_copy.js b/app/services/stream_copy.js index 82f51b23..821cc8fc 100644 --- a/app/services/stream_copy.js +++ b/app/services/stream_copy.js @@ -55,8 +55,8 @@ module.exports = class StreamCopy { return cb(err); } - const copyFromStream = copyFrom(this.sql); - const pgstream = client.query(copyFromStream); + this.copyFromStream = copyFrom(this.sql); + const pgstream = client.query(this.copyFromStream); pgstream .on('end', () => done())