@joystick.js/node-canary 0.0.0-canary.333 → 0.0.0-canary.335
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
|
|
61
|
+
const indexes = await db?.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 });
|
package/dist/app/queues/index.js
CHANGED
|
@@ -20,11 +20,6 @@ class Queue {
|
|
|
20
20
|
const queuesDatabase = database_provider || getTargetDatabaseProvider("queues");
|
|
21
21
|
const queue_queries_for_database_provider = queryMap[queuesDatabase]?.queues;
|
|
22
22
|
const db = this._getDatabaseConnection();
|
|
23
|
-
console.log({
|
|
24
|
-
queuesDatabase,
|
|
25
|
-
queue_queries_for_database_provider,
|
|
26
|
-
db: db.namespace
|
|
27
|
-
});
|
|
28
23
|
if (db && queue_queries_for_database_provider && typeof queue_queries_for_database_provider === "object" && !Array.isArray(queue_queries_for_database_provider)) {
|
|
29
24
|
this.db = Object.entries(queue_queries_for_database_provider || {})?.reduce((boundQueries = {}, [queryFunctionName, queryFunction]) => {
|
|
30
25
|
boundQueries[queryFunctionName] = queryFunction.bind({
|