Skip to content

Conversation

evilfer
Copy link

@evilfer evilfer commented Jul 4, 2018

This PR adds a third constructor param to FlatFileDriver:

public function __construct($baseDirectory, $permissions = 0740, $options = null)

There is one option supported:

$options = [
  'queueType' => 'lifo' // possible values: 'lifo', 'fifo'; default: 'lifo' (no breaking changes)
];

When queue type is FIFO, the behaviour of popMessage and peekQueue is modified.
See \Tests\Driver\FlatFile\FifoDriverTest.php for tests running with FIFO config.


natsort($files);
$files = array_reverse($files);
if ($this->queueType === 'life') {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, not sure why all tests pass with it :(

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because there is no specific test for the new fifo/lifo functionality?
(i created a pull request with fix and tests against your branch)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants