Skip to content

2.0-alpha

Pre-release
Pre-release
Compare
Choose a tag to compare
@mariano mariano released this 03 Nov 19:24
· 20 commits to master since this release

Changed

  • Exception Disque\Connection\ResponseException has been moved to
    Disque\Connection\Response\ResponseException
  • The Disque constructor has changed, so instead of receiving an array of
    IP addresses, it now receives an array of Credentials, where each Credentials
    instance refers to a specific Disque node, and allows the use of passworded
    nodes.
  • JobInterface has changed to add the following methods: getBody(),
    setBody(), getQueue(), setQueue(), getNacks(), setNacks(),
    getAdditionalDeliveries(), setAdditionalDeliveries()
  • The pull() method in Queue no longer throws a JobNotAvailableException
    if no job is available, but instead returns null.
  • The JobNotAvailableException has been removed, as no jobs being available
    is not actually an exception, but a possible acceptable outcome.
  • ManagerInterface no longer has the getConnectionClass() and
    setConnectionClass() methods. Instead it uses the new setConnectionFactory()
    method to allow one to specify a connection factory.

Added

  • Added Node, which handles the connection to a specific node.
  • Added the failed() method to Queue which can be used to mark a job as
    failed, therefore increasing its NACK counter.
  • Added ConnectionFactoryInterface, used by ManagerInterface, to create
    a new connection to redis.
  • Added ConnectionFactoryInterface implementation classes PredisFactory
    and SocketFactory
  • Added NodePrioritizerInterface to allow customizing the way the client
    switches through nodes based on a specific strategy.
  • Added NodePrioritizerInterface implementation classes
    ConservativeJobCountPrioritizer, RandomPrioritizer and NullPrioritizer
  • Added option withcounters to the $options argument in getJob() which
    allows the returned job to include its NACK and additional deliveries
    counters.
  • Added support for NACK