You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migrated issue, originally created by Jeff Dairiki (dairiki)
Now that #9 has made it into release, I’m trying to use distributed_lock with the redis backend. I’ve discovered that one can not pleasantly configure lock_sleep to anything other than an integer or None when using configure_from_config (with a string-valued config dict, such as comes from a .ini settings file.) (Generally one wants to set lock_sleep to a value less than 1 second — e.g. the default is 0.1.)
My guess is that the simplest solution is to fix dogpile.cache.util.coerce_string_conf so that it coerces strings that look like floats to floats. I’m not quite sure whether that might screw something else up, however.
I'd be happy to produce a pull request if this is deemed the right way to proceed.
yeah I struggle with this coerce string thing in various projects, I've come up with a better solution for SQLAlchemy that allows explicit schemas per backend, but over here, certainly just looking for a decimal point and coercing to float in that case is a great solution for now, so feel free to send a pullreq.
Migrated issue, originally created by Jeff Dairiki (dairiki)
Now that #9 has made it into release, I’m trying to use
distributed_lock
with the redis backend. I’ve discovered that one can not pleasantly configurelock_sleep
to anything other than an integer orNone
when usingconfigure_from_config
(with a string-valued config dict, such as comes from a.ini
settings file.) (Generally one wants to setlock_sleep
to a value less than 1 second — e.g. the default is 0.1.)My guess is that the simplest solution is to fix
dogpile.cache.util.coerce_string_conf
so that it coerces strings that look like floats to floats. I’m not quite sure whether that might screw something else up, however.I'd be happy to produce a pull request if this is deemed the right way to proceed.
E.g.
which produces
The text was updated successfully, but these errors were encountered: