Comparing version 0.12.0 to 0.12.1
@@ -33,4 +33,4 @@ 'use strict'; | ||
function createIndex(client, indexName) { | ||
var doctype = arguments.length <= 2 || arguments[2] === undefined ? _constants.DEFAULT_SETTING_DOCTYPE : arguments[2]; | ||
var settings = arguments.length <= 3 || arguments[3] === undefined ? {} : arguments[3]; | ||
var doctype = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _constants.DEFAULT_SETTING_DOCTYPE; | ||
var settings = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; | ||
@@ -37,0 +37,0 @@ var indexBody = { mappings: {} }; |
@@ -18,3 +18,3 @@ 'use strict'; | ||
function indexTimestamp(intervalStr) { | ||
var separator = arguments.length <= 1 || arguments[1] === undefined ? '-' : arguments[1]; | ||
var separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '-'; | ||
@@ -21,0 +21,0 @@ if (separator.match(/[a-z]/i)) throw new Error('Interval separator can not be a letter'); |
@@ -55,3 +55,3 @@ 'use strict'; | ||
function Esqueue(index) { | ||
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; | ||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
@@ -62,3 +62,3 @@ _classCallCheck(this, Esqueue); | ||
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Esqueue).call(this)); | ||
var _this = _possibleConstructorReturn(this, (Esqueue.__proto__ || Object.getPrototypeOf(Esqueue)).call(this)); | ||
@@ -94,3 +94,3 @@ _this.index = index; | ||
value: function addJob(type, payload) { | ||
var opts = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; | ||
var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; | ||
@@ -97,0 +97,0 @@ var timestamp = (0, _index_timestamp2.default)(this.settings.interval, this.settings.dateSeparator); |
@@ -50,3 +50,3 @@ 'use strict'; | ||
function Job(queue, index, type, payload) { | ||
var options = arguments.length <= 4 || arguments[4] === undefined ? {} : arguments[4]; | ||
var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {}; | ||
@@ -58,3 +58,3 @@ _classCallCheck(this, Job); | ||
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Job).call(this)); | ||
var _this = _possibleConstructorReturn(this, (Job.__proto__ || Object.getPrototypeOf(Job)).call(this)); | ||
@@ -137,3 +137,3 @@ _this.queue = queue; | ||
(_get2 = _get(Object.getPrototypeOf(Job.prototype), 'emit', this)).call.apply(_get2, [this, name].concat(args)); | ||
(_get2 = _get(Job.prototype.__proto__ || Object.getPrototypeOf(Job.prototype), 'emit', this)).call.apply(_get2, [this, name].concat(args)); | ||
(_queue = this.queue).emit.apply(_queue, [name].concat(args)); | ||
@@ -140,0 +140,0 @@ } |
@@ -7,3 +7,3 @@ 'use strict'; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
@@ -59,3 +59,3 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
function Job(queue, type, workerFn) { | ||
var opts = arguments.length <= 3 || arguments[3] === undefined ? {} : arguments[3]; | ||
var opts = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; | ||
@@ -67,3 +67,3 @@ _classCallCheck(this, Job); | ||
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Job).call(this)); | ||
var _this = _possibleConstructorReturn(this, (Job.__proto__ || Object.getPrototypeOf(Job)).call(this)); | ||
@@ -117,3 +117,3 @@ _this.id = puid.generate(); | ||
(_get2 = _get(Object.getPrototypeOf(Job.prototype), 'emit', this)).call.apply(_get2, [this, name].concat(args)); | ||
(_get2 = _get(Job.prototype.__proto__ || Object.getPrototypeOf(Job.prototype), 'emit', this)).call.apply(_get2, [this, name].concat(args)); | ||
(_queue = this.queue).emit.apply(_queue, [name].concat(args)); | ||
@@ -178,3 +178,3 @@ } | ||
var output = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1]; | ||
var output = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; | ||
@@ -181,0 +181,0 @@ this.debug('Failing job ' + job._id); |
{ | ||
"name": "esqueue", | ||
"version": "0.12.0", | ||
"version": "0.12.1", | ||
"description": "Job queue, powered by Elasticsearch", | ||
@@ -14,3 +14,3 @@ "main": "lib/index.js", | ||
}, | ||
"author": "Joe Fleming (https://github.com/w33ble)", | ||
"author": "Elastic (https://github.com/elastic)", | ||
"keywords": [ | ||
@@ -24,3 +24,3 @@ "job", | ||
"type": "git", | ||
"url": "https://github.com/w33ble/esqueue.git" | ||
"url": "https://github.com/elastic/esqueue.git" | ||
}, | ||
@@ -27,0 +27,0 @@ "license": "Apache-2.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
46060