Fix debugging output
This commit is contained in:
parent
203dda2abb
commit
120dbe0b0a
@ -1,7 +1,5 @@
|
|||||||
const WebSocketStream = require('websocket-stream')
|
const WebSocketStream = require('websocket-stream')
|
||||||
const ConcatStream = require('concat-stream')
|
|
||||||
const CombinedStream = require('combined-stream')
|
const CombinedStream = require('combined-stream')
|
||||||
const { Duplex, Readable } = require('stream')
|
|
||||||
const { Buffer } = require('buffer')
|
const { Buffer } = require('buffer')
|
||||||
|
|
||||||
class Streamer {
|
class Streamer {
|
||||||
|
@ -4,7 +4,6 @@ const Message = require('../../shared/Message')
|
|||||||
const connector = require('../connector')
|
const connector = require('../connector')
|
||||||
|
|
||||||
module.exports = exports = function (path, fd, cb) {
|
module.exports = exports = function (path, fd, cb) {
|
||||||
console.log('[FLUSH]')
|
|
||||||
connector.send(
|
connector.send(
|
||||||
Message.route('fs.flush')
|
Message.route('fs.flush')
|
||||||
.data({ path, descriptor: fd })
|
.data({ path, descriptor: fd })
|
||||||
@ -13,7 +12,6 @@ console.log('[FLUSH]')
|
|||||||
return Errors.toCallback(cb, msg.error())
|
return Errors.toCallback(cb, msg.error())
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('[/FLUSH]')
|
|
||||||
return process.nextTick(cb, 0)
|
return process.nextTick(cb, 0)
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
@ -4,7 +4,6 @@ const Message = require('../../shared/Message')
|
|||||||
const connector = require('../connector')
|
const connector = require('../connector')
|
||||||
|
|
||||||
module.exports = exports = function (path, fd, cb) {
|
module.exports = exports = function (path, fd, cb) {
|
||||||
console.log('[RELEASE]')
|
|
||||||
connector.send(
|
connector.send(
|
||||||
Message.route('fs.release')
|
Message.route('fs.release')
|
||||||
.data({ path, descriptor: fd })
|
.data({ path, descriptor: fd })
|
||||||
@ -13,7 +12,6 @@ console.log('[RELEASE]')
|
|||||||
return Errors.toCallback(cb, msg.error())
|
return Errors.toCallback(cb, msg.error())
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('[/RELEASE]')
|
|
||||||
return process.nextTick(cb, 0)
|
return process.nextTick(cb, 0)
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
@ -7,7 +7,6 @@ const Streamer = require('../Streamer')
|
|||||||
module.exports = exports = async function (path, fd, buffer, length, position, cb) {
|
module.exports = exports = async function (path, fd, buffer, length, position, cb) {
|
||||||
try {
|
try {
|
||||||
const { socket_uuid, node_uuid, descriptor } = await connector.simple_request('stream.getfd', { descriptor: fd })
|
const { socket_uuid, node_uuid, descriptor } = await connector.simple_request('stream.getfd', { descriptor: fd })
|
||||||
console.log({socket_uuid, node_uuid, descriptor})
|
|
||||||
|
|
||||||
const streamer = new Streamer(socket_uuid, node_uuid, length, position, descriptor)
|
const streamer = new Streamer(socket_uuid, node_uuid, length, position, descriptor)
|
||||||
streamer.write(buffer).then(() => {
|
streamer.write(buffer).then(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user