All Notable changes will be documented in this file. This project adheres to Semantic Versioning.
2.0.1 - 2016-05-10
- Job IDs should now always follow the Disque RC1 format.
- Reconnect to node when node lost connection.
- Added support for
JSCAN
- Added support for
PAUSE
2.0-alpha - 2015-11-03
- Exception
Disque\Connection\ResponseException
has been moved toDisque\Connection\Response\ResponseException
- The
Disque
constructor has changed, so instead of receiving an array of IP addresses, it now receives an array ofCredentials
, where eachCredentials
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 inQueue
no longer throws aJobNotAvailableException
if no job is available, but instead returnsnull
. - The
JobNotAvailableException
has been removed, as no jobs being available is not actually an exception, but a possible acceptable outcome. ManagerInterface
no longer has thegetConnectionClass()
andsetConnectionClass()
methods. Instead it uses the newsetConnectionFactory()
method to allow one to specify a connection factory.- Changed Job ID format to adapt to changes from Disque RC1
- Added
Node
, which handles the connection to a specific node. - Added the
failed()
method toQueue
which can be used to mark a job as failed, therefore increasing itsNACK
counter. - Added
ConnectionFactoryInterface
, used byManagerInterface
, to create a new connection to redis. - Added
ConnectionFactoryInterface
implementation classesPredisFactory
andSocketFactory
- Added
NodePrioritizerInterface
to allow customizing the way the client switches through nodes based on a specific strategy. - Added
NodePrioritizerInterface
implementation classesConservativeJobCountPrioritizer
,RandomPrioritizer
andNullPrioritizer
- Added option
withcounters
to the$options
argument ingetJob()
which allows the returned job to include itsNACK
and additional deliveries counters. - Added support for
NACK
1.3.0 - 2015-05-18
- Added support for
WORKING
. - Added
processing()
method to Queue API. - Added
$password
option toaddServer()
inDisque\Client
.
- By default when creating a new
Disque\Client
without arguments NO server is pre-loaded. You will have to manually add servers viaaddServer()
, or specify them to theDisque\Client
constructor.
1.2.1 - 2015-05-14
QPEEK
changed in upstream and now returns the job queue. Client API has been modified to reflect this.CommandInterface
has a new method:isBlocking()
, which tells if the given command should block while waiting for a response to not be affected by timeouts.
- Added support for
QSCAN
.
- Fixed bug where if the connection would timeout while waiting for a response
a
ConnectionException
would be thrown. This affectedgetJob()
which should not be interrupted by a timeout. This required a change in the definition ofCommandInterface
by adding the methodisBlocking()
1.2.0 - 2015-05-12
JobInterface
is now a simpler interface. Itsload()
anddump()
methods have been moved to aMarshalInterface
, effectively changing how custom Job classes work.Disque\Queue\MarshalException
has been moved toDisque\Queue\Marshal\MarshalException
.- The
setJobClass()
method inQueue
has been removed. Instead usesetMarshaler()
, which should be given an instance ofDisque\Queue\Marshaler\MarshalerInterface
.
1.1.0 - 2015-05-10
- Refactoring of response parsing for greater flexibility.
- Added new
Disque\Connection\Manager
class to manage connections to nodes. GETJOB
can now influence which node we are connected to. By means of$disque->getConnectionManager()->setMinimumJobsToChangeNode()
we can specify that if a certain node produces that many jobs, then we should instead connect to the node producing those jobs (as suggested by Disque itself).- Added
Disque\Queue\Queue
andDisque\Queue\Job
class to offer a higher level API that simplifies queueing and fetching jobs - Added method
queue()
toDisque\Client
to create / fetch a queue which is an instance ofDisque\Queue\Queue
. - Added
schedule()
method toDisque\Queue
that allows to easily schedule jobs to be processed at a certain time.
Disque\Connection\Connection
is now namedDisque\Connection\Socket
.- The method
setConnectionImplementation
has been moved toDisque\Connection\Manager
, and renamed tosetConnectionClass
. So from a disque instance you can change it via:$disque->getConnectionManager()->setConnectionClass($class)
- Moved exceptions around:
Disque\Exception\InvalidCommandArgumentException
toDisque\Command\Argument\InvalidArgumentException
Disque\Exception\InvalidCommandException
toDisque\Command\InvalidCommandException
Disque\Exception\InvalidCommandOptionException
toDisque\Command\Argument\InvalidOptionException
Disque\Exception\InvalidCommandResponseException
toDisque\Command\Response\InvalidResponseException
Disque\Exception\Connection\Exception\ConnectionException
toDisque\Connection\ConnectionException
Disque\Exception\Connection\Exception\ResponseException
toDisque\Connection\ResponseException
Disque\Exception\DisqueException
toDisque\DisqueException
- Fixed issue where when a
timeout
was using when callinggetJob()
, and the call timed out because there were no jobs available, an non-array would be returned. No on that case it will return an empty array. - Fixed issue where if no options were provided to
addJob()
, yet all three parameters were specified, anInvalidCommandArgumentException
was thrown.
1.0.0 - 2015-05-04
- Added support for commands
HELLO
,INFO
,SHOW
,ADDJOB
,DELJOB
,GETJOB
,ACKJOB
,FASTACK
,ENQUEUE
,DEQUEUE
,QLEN
,QPEEK
. - Added built-in connection to Disque.
- Added support for Predis connections, and allowing adding new connection
methods via
ConnectionInterface
.