@supergrowthai/tq 1.0.7 → 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.mjs CHANGED
@@ -50,6 +50,7 @@ import { tId } from "./utils/task-id-gen.mjs";
50
50
  import { Actions } from "./core/Actions.mjs";
51
51
  import { AsyncActions } from "./core/async/AsyncActions.mjs";
52
52
  import moment from "moment";
53
+ import * as os from "os";
53
54
  import { AsyncTaskManager } from "./core/async/AsyncTaskManager.mjs";
54
55
  class LockManager {
55
56
  constructor(cacheProvider, options) {
@@ -953,7 +954,7 @@ class TaskHandler {
953
954
  this.queueStats = /* @__PURE__ */ new Map();
954
955
  this.logger = new Logger("TaskHandler", LogLevel.INFO);
955
956
  this.config = config || {};
956
- this.workerId = `${(void 0)()}-${process.pid}-${Date.now()}`;
957
+ this.workerId = `${os.hostname()}-${process.pid}-${Date.now()}`;
957
958
  this.workerStartedAt = /* @__PURE__ */ new Date();
958
959
  this.taskStore = new TaskStore(databaseAdapter);
959
960
  this.taskRunner = new TaskRunner(
@@ -1231,7 +1232,7 @@ class TaskHandler {
1231
1232
  buildWorkerInfo() {
1232
1233
  return {
1233
1234
  worker_id: this.workerId,
1234
- hostname: (void 0)(),
1235
+ hostname: os.hostname(),
1235
1236
  pid: process.pid,
1236
1237
  started_at: this.workerStartedAt,
1237
1238
  enabled_queues: this.enabledQueues