How to use bull-arena - 2 common examples

To help you get started, we’ve selected a few bull-arena examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github HugoDF / express-bull-es6 / server.js View on Github external
app.post('/example', (req, res) => {
  console.log(`Hit example with ${JSON.stringify(req.body)}`);
  return res.sendStatus(200);
});

function getRedisConfig(redisUrl) {
  const redisConfig = url.parse(redisUrl);
  return {
    host: redisConfig.hostname || 'localhost',
    port: Number(redisConfig.port || 6379),
    database: (redisConfig.pathname || '/0').substr(1) || '0',
    password: redisConfig.auth ? redisConfig.auth.split(':')[1] : undefined
  };
}

app.use('/', Arena(
  {
    queues: [
      {
        name: NOTIFY_URL,
        hostId: 'Worker',
        redis: getRedisConfig(process.env.REDIS_URL)
      }
    ]
  },
  {
    basePath: '/arena',
    disableListen: true
  }
));

const PORT = process.env.PORT || 3000;
github GetStream / Winds / api / src / controllers / health.js View on Github external
extra: { additional: 'data', is: 'awesome' },
		});
	}
	try {
		Throw();
	} catch (err) {
		logger.error({ err });
	}

	logger.error('0');
	logger.error('1');

	res.status(200).send('{}');
};

exports.bullArena = Arena({
	queues: [
		{
			hostId: 'local',
			name: 'rss',
			url: config.cache.uri,
		},
		{
			hostId: 'local',
			name: 'podcast',
			url: config.cache.uri,
		},
		{
			hostId: 'local',
			name: 'og',
			url: config.cache.uri,
		},

bull-arena

An interactive UI dashboard for Bee Queue

MIT
Latest version published 5 months ago

Package Health Score

67 / 100
Full package analysis

Popular bull-arena functions