Open Gappa88 opened 6 years ago
hi,
I have a Nodejs (v8.11) application that writes data to Redis (v4.0.10) via Kue (v0.11.6). I sat a maxmemory limit to Redis and when I reach that limit Kue doesn't properly handle errors from redis.
The bugged function is this in detail here.
this.set('data', json, function() { // missing return parameters (err, foo) // state this.state(this._state, fn); }.bind(this));
where the callback function doesn't handle return parameters.
This bug is swallowing important Redis' errors like
OOM command not allowed when used memory > 'maxmemory'
does anyone have a patch that solve this and allow me to take errors back to the main function caller in order to handle it?
can this snippet solve cleanly the problem, @behrad?
this.set('data', json, function (err) { // <=== err added if (err) return fn(err); // <=== return the error // state this.state(this._state, fn); }.bind(this));
hi,
I have a Nodejs (v8.11) application that writes data to Redis (v4.0.10) via Kue (v0.11.6). I sat a maxmemory limit to Redis and when I reach that limit Kue doesn't properly handle errors from redis.
The bugged function is this in detail here.
where the callback function doesn't handle return parameters.
This bug is swallowing important Redis' errors like
does anyone have a patch that solve this and allow me to take errors back to the main function caller in order to handle it?
can this snippet solve cleanly the problem, @behrad?