Thanks to visit codestin.com
Credit goes to github.com

Skip to content

QueueManager Fails when Multiple Queue Configs Contain uniqueCache Key #113

Description

@amayer5125

When multiple queue configs have the uniqueCache key QueueManager fails to load with the following error:

BadMethodCallException: Cannot reconfigure existing key "Cake/Queue.queueUnique"

/code/vendor/cakephp/cakephp/src/Core/StaticConfigTrait.php:91
/code/src/QueueManager.php:130

The following test can be used to trigger the error:

public function testMultipleUniqueCache()
{
    QueueManager::setConfig('test', [
        'url' => 'null:',
        'uniqueCache' => [
            'engine' => 'File',
        ],
    ]);
    QueueManager::setConfig('test2', [
        'url' => 'null:',
        'uniqueCache' => [
            'engine' => 'File',
        ],
    ]);
}

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions