Skip to content

Enhance onOneServer & withoutOverlapping#43

Open
zacksleo wants to merge 4 commits intoomnilight:masterfrom
zacksleo:enhance-on-one-server
Open

Enhance onOneServer & withoutOverlapping#43
zacksleo wants to merge 4 commits intoomnilight:masterfrom
zacksleo:enhance-on-one-server

Conversation

@zacksleo
Copy link
Contributor

@zacksleo zacksleo commented Nov 9, 2018

  1. withoutOverlapping can specify minutes to expire when using redis mutex

If needed, you may specify how many minutes must pass before the "without overlapping" lock expires. By default, the lock will expire after 24 hours:

  1. onOneServer generated a mutex related to the time, and should not release immediately. If the schedule run very quickly, then the mutex will be auto relese. Schedules on other servers may can also run at the same time.

People who want this feature should config the redis mutex and disable autoRelease.

    'mutex' => [
        'class' => 'yii\redis\Mutex',
        'autoRelease' => false, // You should disable autoRelease here
        'redis' => [
            'hostname' => 'localhost',
            'port' => 6379,

@zacksleo zacksleo changed the title Enhance on one server Enhance onOneServer Nov 9, 2018
@zacksleo zacksleo changed the title Enhance onOneServer Enhance onOneServer & withoutOverlapping Nov 9, 2018
@zacksleo
Copy link
Contributor Author

zacksleo commented Nov 15, 2018

@gietos Can you check these PRs ? #43 #41

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.

1 participant