Skip to content

Commit

Permalink
Merge pull request #390 from Freezystem/fix/remove-bluebird-from-sequ…
Browse files Browse the repository at this point in the history
…elize-adapter

Remove bluebird from moleculer-db-adapter-sequelize
  • Loading branch information
icebob committed Aug 26, 2024
2 parents 7a84991 + b050ada commit 10adf5e
Show file tree
Hide file tree
Showing 5 changed files with 12,359 additions and 12,353 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ const SequelizeAdapter = require("../../index");
const ModuleChecker = require("../../../moleculer-db/test/checker");
const Sequelize = require("sequelize");

const delay = (ms) => new Promise(resolve => setTimeout(resolve, ms));

// Create broker
const broker = new ServiceBroker({
logger: console,
Expand Down Expand Up @@ -93,7 +95,7 @@ const checker = new ModuleChecker(12);
// Start checks
function start() {
broker.start()
.delay(500)
.then(() => delay(500))
.then(() => checker.execute())
.catch(console.error)
.then(() => broker.stop())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ const SequelizeAdapter = require("../../index");
const Sequelize = require("sequelize");
const Op = Sequelize.Op;

const delay = (ms) => new Promise(resolve => setTimeout(resolve, ms));

process.on("warning", e => console.warn(e.stack));

// Create broker
Expand Down Expand Up @@ -46,7 +48,7 @@ const checker = new ModuleChecker(22);
// Start checks
function start() {
broker.start()
.delay(500)
.then(() => delay(500))
.then(() => checker.execute())
.catch(console.error)
.then(() => broker.stop())
Expand Down
Loading

0 comments on commit 10adf5e

Please sign in to comment.