MCPcopy Index your code
hub / github.com/scality/cloudserver / _cleanOldStream

Method _cleanOldStream

lib/utilities/serverAccessLogger.js:68–83  ·  view source on GitHub ↗
(end)

Source from the content-addressed store, hash-verified

66 }
67
68 _cleanOldStream(end) {
69 logger.debug('ServerAccessLogger: cleaning old stream');
70
71 if (!this.stream) {
72 return;
73 }
74
75 // remove the 'close' handler.
76 this.stream.removeAllListeners();
77 if (end) {
78 this.stream.end();
79 }
80 this._stat = undefined;
81 this.stream = undefined;
82 this._waitingDrain = false;
83 }
84
85 _reopenStream() {
86 fs.open(this._filename, 'a', 0o644, (err, fd) => {

Callers 2

constructorMethod · 0.95
_reopenStreamMethod · 0.95

Calls 2

debugMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected