Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance onOneServer & withoutOverlapping #43

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

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