Core synchronous queue with an example worker
This commit is contained in:
11
src/services/calc-queue/exceptions/AlreadyInProgress.js
Normal file
11
src/services/calc-queue/exceptions/AlreadyInProgress.js
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
module.exports = function AlreadyInProgress(extra) {
|
||||
Error.captureStackTrace(this, this.constructor)
|
||||
this.name = this.constructor.name
|
||||
this.message = 'calculation request is already in progress'
|
||||
if (typeof extra !== 'undefined') {
|
||||
this.extra = extra
|
||||
}
|
||||
}
|
||||
|
||||
require('util').inherits(module.exports, Error)
|
||||
Reference in New Issue
Block a user