@joystick.js/node-canary 0.0.0-canary.330 → 0.0.0-canary.332

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.
@@ -58,7 +58,7 @@ var queues_default = {
58
58
  },
59
59
  initializeDatabase: async function() {
60
60
  const db = this.db?.collection(`queue_${this.queue.name}`);
61
- const indexes = await this.db?.collection(`queue_${this.queue.name}`).indexes();
61
+ const indexes = await this.db?.collection(`queue_${this.queue.name}`)?.indexes();
62
62
  db.createIndex({ status: 1 });
63
63
  db.createIndex({ status: 1, nextRunAt: 1 });
64
64
  db.createIndex({ status: 1, environment: 1, nextRunAt: 1, lockedBy: 1 });
@@ -23,7 +23,7 @@ class Queue {
23
23
  console.log({
24
24
  queuesDatabase,
25
25
  queue_queries_for_database_provider,
26
- db
26
+ db: db.namespace
27
27
  });
28
28
  if (db && queue_queries_for_database_provider && typeof queue_queries_for_database_provider === "object" && !Array.isArray(queue_queries_for_database_provider)) {
29
29
  this.db = Object.entries(queue_queries_for_database_provider || {})?.reduce((boundQueries = {}, [queryFunctionName, queryFunction]) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joystick.js/node-canary",
3
- "version": "0.0.0-canary.330",
3
+ "version": "0.0.0-canary.332",
4
4
  "type": "module",
5
5
  "description": "A Node.js framework for building web apps.",
6
6
  "main": "./dist/index.js",