GithubHelp home page GithubHelp logo

flowpack / jobqueue-beanstalkd Goto Github PK

View Code? Open in Web Editor NEW
6.0 7.0 7.0 47 KB

A job queue backend for the Flow framework, based on Beanstalkd

License: MIT License

PHP 100.00%
neoscms flowframework beanstalkd jobqueue

jobqueue-beanstalkd's Introduction

Flowpack.JobQueue.Beanstalkd

A job queue backend for the Flowpack.JobQueue.Common package based on beanstalkd.

Usage

Install the package using composer:

composer require flowpack/jobqueue-beanstalkd

If not already installed, that will fetch its requirements, namely jobqueue-common and pda/pheanstalk. NOTE: This package needs a running beanstalkd server

Now the queue can be configured like this:

Flowpack:
  JobQueue:
    Common:
      queues:
        'some-queue':
          className: 'Flowpack\JobQueue\Beanstalkd\Queue\BeanstalkdQueue'
          executeIsolated: true
          options:
            client:
              host: 127.0.0.11
              port: 11301
            defaultTimeout: 50
          releaseOptions:
            priority: 512
            delay: 120

Specific options

The BeanstalkdQueue supports following options:

Option Type Default Description
defaultTimeout integer 60 Number of seconds new messages are waited for before a timeout occurs (This is overridden by a "timeout" argument in the waitAndTake() and waitAndReserve() methods
client array ['host' => '127.0.0.1', 'port' => 11300] Beanstalkd connection settings

Submit options

Additional options supported by JobManager::queue(), BeanstalkdQueue::submit() and the Job\Defer annotation:

Option Type Default Description
delay integer 0 Number of seconds before a message is marked "ready" after submission. This can be useful to prevent premature execution of jobs (i.e. before entites are persisted)
priority integer 1024 Priority of the message. most urgent: 0, least urgent: 4294967295
ttr integer 60 Number of seconds a message is allowed to be reserved before it is released, aborted or finished. NOTE: This option is not available in the releaseOptions!

Release options

Additional options to be specified via releaseOptions:

Option Type Default Description
delay integer 0 Number of seconds before a message is marked "ready" after it has been released.
priority integer 1024 Priority of the message. most urgent: 0, least urgent: 4294967295

License

This package is licensed under the MIT license

Contributions

Pull-Requests are more than welcome. Make sure to read the Code Of Conduct.

jobqueue-beanstalkd's People

Contributors

bwaidelich avatar daniellienert avatar hlubek avatar johannessteu avatar kdambekalns avatar skurfuerst avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.