How to use bee-queue - 6 common examples

To help you get started, we’ve selected a few bee-queue 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 stitchng / adonis-queue / src / Queue / index.js View on Github external
.save(async (err, $job) => { // See: https://github.com/bee-queue/bee-queue/issues/147
          if (err) {
            console.error(`@@adonisjs/Queue: failed in creating job id=${this._jobUuid} on queue: ${_name}`)

            // Known error when redis has not all lua scripts loaded properly
            if (err.command === 'EVALSHA') {
              await bqScripts.buildCache(this.getByName(_name))
              console.info(`@@adonisjs/Queue: successfully reloaded Lua scripts into cache; retrying job creation id=${this._jobUuid}`)

              // try to create job again
              try {
                await queue.removeJob(this._jobUuid)
              } catch (ex) { $job = null } finally {
                _job = $job || queue.createJob(job.makeArg(job))

                _job.setId(this._jobUuid)
                  .timeout(job.timeOut || 0)
                  .backoff('fixed', job.retryUntil || 0)
                  .retries(job.retryCount || 2)
                  .delayUntil(job.delayUntil || 0)
                  .save()
              }
            }
github leohmoraes / rocketseat-02 / src / lib / Queue.js View on Github external
jobs.forEach(({ key, handle }) => {
      // desestruturado
      // this.queues[key] = new Bee(key, {
      //   redis: redisConfig,
      // }), //this

      this.queues[key] = {
        bee: new Bee(key, {
          // objeto: fila
          redis: redisConfig, // grava o trabalho no Redis
        }), // this
        handle, // vem lá do Job, metodo que vai processar
      };
    }); // foreach
  } // init
github rodrigotamura / go-stack-2019 / module02 / src / lib / Queue.js View on Github external
jobs.forEach(({ key, handle }) => {
      this.queues[key] = {
        bee: new Bee(key, {
          // here we store our queue
          redis: redisConfig,
        }),
        handle, // this will process the current job
      };
    });
  }
github luizbatanero / gostack-meetapp / api / src / lib / Queue.js View on Github external
jobs.forEach(({ key, handle }) => {
      this.queues[key] = {
        bee: new Bee(key, {
          redis: redisConfig,
        }),
        handle,
      };
    });
  }
github osvaldokalvaitir / node-modulo3-novo / src / lib / Queue.js View on Github external
jobs.forEach(({ key, handle }) => {
      this.queues[key] = {
        bee: new Bee(key, {
          redis: redisConfig,
        }),
        handle,
      };
    });
  }

bee-queue

A simple, fast, robust job/task queue, backed by Redis.

MIT
Latest version published 1 year ago

Package Health Score

70 / 100
Full package analysis

Popular bee-queue functions