@stemy/backend 3.1.4 → 3.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2415,7 +2415,7 @@
2415
2415
  this.jobs = this.jobTypes.reduce(function (res, jobType) {
2416
2416
  var jobName = getConstructorName(jobType);
2417
2417
  res[jobName] = function (jobParams, uniqueId) {
2418
- var job = _this.resolveJobInstance(jobType, jobParams);
2418
+ var job = _this.resolveJobInstance(jobType, jobParams, uniqueId);
2419
2419
  var messageBridge = {
2420
2420
  sendMessage: function (message, params) {
2421
2421
  params.uniqueId = uniqueId;
@@ -2603,11 +2603,13 @@
2603
2603
  }
2604
2604
  return this.tryResolve(jobType, params);
2605
2605
  };
2606
- JobManager.prototype.resolveJobInstance = function (jobType, params) {
2606
+ JobManager.prototype.resolveJobInstance = function (jobType, params, uniqueId) {
2607
+ if (uniqueId === void 0) { uniqueId = null; }
2607
2608
  var container = this.container.createChildContainer();
2608
2609
  Object.keys(params).map(function (name) {
2609
2610
  container.register(name, { useValue: params[name] });
2610
2611
  });
2612
+ container.register("uniqueId", { useValue: uniqueId });
2611
2613
  container.register(jobType, jobType);
2612
2614
  return container.resolve(jobType);
2613
2615
  };