Skip to content

Default TTR from config seems not to be apllied #489

@gb5256

Description

@gb5256

What steps will reproduce the problem?

I am using this config:

'components' => [
   ...
    'queue' => [
        'class' => '\yii\queue\db\Queue::class', 
        'as log' => \yii\queue\LogBehavior::class,
        'db' => 'db', 
        'tableName' => '{{%queue}}', 
        'channel' => 'default',
        'mutex' => \yii\mutex\MysqlMutex::class,
        'ttr' => 600,
    ],

What's expected?

I expect that if I create a job without mentioning a specific ttr in the job, that it then takes the default value.

What do you get instead?

It always uses 300 s (as it is defined inside yii\queue\Queue : public $ttr = 300;

Additional info

Q A
Yii version 2.0.48.1
PHP version 8.0
Operating system Ubuntu 18.04 LTS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions