✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ server366.web-hosting.com ​🇻​♯➤ 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2025

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 67.223.118.204 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.217.62
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /opt/alt/python27/lib64/python2.7/bsddb//dbutils.py
#------------------------------------------------------------------------
#
# Copyright (C) 2000 Autonomous Zone Industries
#
# License:      This is free software.  You may use this software for any
#               purpose including modification/redistribution, so long as
#               this header remains intact and that you do not claim any
#               rights of ownership or authorship of this software.  This
#               software has been tested, but no warranty is expressed or
#               implied.
#
# Author: Gregory P. Smith <greg@krypto.org>
#
# Note: I don't know how useful this is in reality since when a
#       DBLockDeadlockError happens the current transaction is supposed to be
#       aborted.  If it doesn't then when the operation is attempted again
#       the deadlock is still happening...
#       --Robin
#
#------------------------------------------------------------------------


#
# import the time.sleep function in a namespace safe way to allow
# "from bsddb.dbutils import *"
#
from time import sleep as _sleep

import sys
absolute_import = (sys.version_info[0] >= 3)
if absolute_import :
    # Because this syntaxis is not valid before Python 2.5
    exec("from . import db")
else :
    import db

# always sleep at least N seconds between retrys
_deadlock_MinSleepTime = 1.0/128
# never sleep more than N seconds between retrys
_deadlock_MaxSleepTime = 3.14159

# Assign a file object to this for a "sleeping" message to be written to it
# each retry
_deadlock_VerboseFile = None


def DeadlockWrap(function, *_args, **_kwargs):
    """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"
    """
    sleeptime = _deadlock_MinSleepTime
    max_retries = _kwargs.get('max_retries', -1)
    if 'max_retries' in _kwargs:
        del _kwargs['max_retries']
    while True:
        try:
            return function(*_args, **_kwargs)
        except db.DBLockDeadlockError:
            if _deadlock_VerboseFile:
                _deadlock_VerboseFile.write(
                    'dbutils.DeadlockWrap: sleeping %1.3f\n' % sleeptime)
            _sleep(sleeptime)
            # exponential backoff in the sleep time
            sleeptime *= 2
            if sleeptime > _deadlock_MaxSleepTime:
                sleeptime = _deadlock_MaxSleepTime
            max_retries -= 1
            if max_retries == -1:
                raise


#------------------------------------------------------------------------


Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
1 May 2025 1.26 PM
root / linksafe
0755
__init__.py
15.613 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
__init__.pyc
12.628 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
__init__.pyo
12.628 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
db.py
2.666 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
db.pyc
0.591 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
db.pyo
0.591 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
dbobj.py
11.065 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
dbobj.pyc
19.74 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
dbobj.pyo
19.74 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
dbrecio.py
5.184 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
dbrecio.pyc
5.329 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
dbrecio.pyo
5.329 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
dbshelve.py
11.287 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
dbshelve.pyc
13.377 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
dbshelve.pyo
13.377 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
dbtables.py
30.143 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
dbtables.pyc
24.717 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
dbtables.pyo
24.585 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
dbutils.py
2.895 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
dbutils.pyc
1.614 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
dbutils.pyo
1.614 KB
8 Jan 2025 10.43 AM
root / linksafe
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF