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

Make retry timeout configurable #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fabianfreyer
Copy link

Instead of hardcoding the sleep timeouts between 0.5 and 1 second, make these configurable using the $CFG->local_redislock_retry_timeout and $CFG->local_redislock_retry_jitter configuration variables, which
default to the currently hardcoded limits.

cc @naderman

Instead of hardcoding the sleep timeouts between 0.5 and 1 second,
make these configurable using the `$CFG->local_redislock_retry_timeout`
and `$CFG->local_redislock_retry_jitter` configuration variables, which
default to the currently hardcoded limits.

Discussed-with: Nils Aderman <[email protected]>
@dvdcastro
Copy link

Unit tests are failing locally for me.

vendor/bin/phpunit local/redislock/tests/redis_lock_factory_test.php
Failed asserting that a boolean is not empty.
 /vagrant/www/moodle/local/redislock/tests/redis_lock_factory_test.php:134
 /vagrant/www/moodle/lib/phpunit/classes/advanced_testcase.php:91

Failed asserting that a boolean is not empty.
 /vagrant/www/moodle/local/redislock/tests/redis_lock_factory_test.php:156
 /vagrant/www/moodle/lib/phpunit/classes/advanced_testcase.php:91

Can you please verify?

@dvdcastro dvdcastro self-requested a review February 4, 2021 20:47
Copy link

@dvdcastro dvdcastro left a comment

Choose a reason for hiding this comment

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

Pending PHPUnit test fixes.

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