@supergrowthai/tq 1.0.6 → 1.0.8

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.
package/dist/index.cjs CHANGED
@@ -52,7 +52,25 @@ const utils_taskIdGen = require("./utils/task-id-gen.cjs");
52
52
  const core_Actions = require("./core/Actions.cjs");
53
53
  const core_async_AsyncActions = require("./core/async/AsyncActions.cjs");
54
54
  const moment = require("moment");
55
+ const os = require("os");
55
56
  const core_async_AsyncTaskManager = require("./core/async/AsyncTaskManager.cjs");
57
+ function _interopNamespaceDefault(e) {
58
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
59
+ if (e) {
60
+ for (const k in e) {
61
+ if (k !== "default") {
62
+ const d = Object.getOwnPropertyDescriptor(e, k);
63
+ Object.defineProperty(n, k, d.get ? d : {
64
+ enumerable: true,
65
+ get: () => e[k]
66
+ });
67
+ }
68
+ }
69
+ }
70
+ n.default = e;
71
+ return Object.freeze(n);
72
+ }
73
+ const os__namespace = /* @__PURE__ */ _interopNamespaceDefault(os);
56
74
  class LockManager {
57
75
  constructor(cacheProvider, options) {
58
76
  this.cacheProvider = cacheProvider;
@@ -955,7 +973,7 @@ class TaskHandler {
955
973
  this.queueStats = /* @__PURE__ */ new Map();
956
974
  this.logger = new client.Logger("TaskHandler", client.LogLevel.INFO);
957
975
  this.config = config || {};
958
- this.workerId = `${(void 0)()}-${process.pid}-${Date.now()}`;
976
+ this.workerId = `${os__namespace.hostname()}-${process.pid}-${Date.now()}`;
959
977
  this.workerStartedAt = /* @__PURE__ */ new Date();
960
978
  this.taskStore = new TaskStore(databaseAdapter);
961
979
  this.taskRunner = new TaskRunner(
@@ -1233,7 +1251,7 @@ class TaskHandler {
1233
1251
  buildWorkerInfo() {
1234
1252
  return {
1235
1253
  worker_id: this.workerId,
1236
- hostname: (void 0)(),
1254
+ hostname: os__namespace.hostname(),
1237
1255
  pid: process.pid,
1238
1256
  started_at: this.workerStartedAt,
1239
1257
  enabled_queues: this.enabledQueues