|
Server : Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 System : Linux server.jackjohnson.com 2.6.32-279.5.2.el6.x86_64 #1 SMP Fri Aug 24 01:07:11 UTC 2012 x86_64 User : jackjohn ( 502) PHP Version : 5.3.17 Disable Function : NONE Directory : /usr/lib64/python2.6/bsddb/ |
Upload File : |
Ñò
§ÚêLc @ sq d d k l Z d d k Z e i d d j Z e o d d Un
d d k Z d d Z d Z d Z
d „ Z d S(
iÿÿÿÿ( t sleepNi i s from . import dbg ð?i€ gn†ðù! @c O sÒ t } | i d d ƒ } d | j o | d =n x› t o“ y | | | Ž SWq3 t i j
ol t o t i d | ƒ n t | ƒ | d 9} | t j o
t } n | d 8} | d j o ‚ qÉ q3 Xq3 Wd S( s? DeadlockWrap(function, *_args, **_kwargs) - automatically retries
function in case of a database deadlock.
This is a function intended to be used to wrap database calls such
that they perform retrys with exponentially backing off sleeps in
between when a DBLockDeadlockError exception is raised.
A 'max_retries' parameter may optionally be passed to prevent it
from retrying forever (in which case the exception will be reraised).
d = DB(...)
d.open(...)
DeadlockWrap(d.put, "foo", data="bar") # set key "foo" to "bar"
t max_retriesiÿÿÿÿs% dbutils.DeadlockWrap: sleeping %1.3f
i i N( t _deadlock_MinSleepTimet gett Truet dbt DBLockDeadlockErrort _deadlock_VerboseFilet writet _sleept _deadlock_MaxSleepTime( t functiont _argst _kwargst sleeptimeR ( ( s% /usr/lib64/python2.6/bsddb/dbutils.pyt DeadlockWrap/ s&