Update pbr usage to modern understandings
Explicitly, d2to1 is the devil. Updated pep8 issues. Change-Id: I35307f820a98244f5a9ae32ce01f18ce7b434c19
This commit is contained in:
parent
903748e7ac
commit
8095ea24ad
@ -36,7 +36,7 @@ class ExpungeScheduler(object):
|
|||||||
if self.args.server_id != day % self.args.number_of_servers:
|
if self.args.server_id != day % self.args.number_of_servers:
|
||||||
self.logger.info('Not our turn to run expunge check, sleeping')
|
self.logger.info('Not our turn to run expunge check, sleeping')
|
||||||
self.expunge_timer = threading.Timer(
|
self.expunge_timer = threading.Timer(
|
||||||
24*60*60, self.run_expunge, ()
|
24 * 60 * 60, self.run_expunge, ()
|
||||||
)
|
)
|
||||||
with db_session() as session:
|
with db_session() as session:
|
||||||
try:
|
try:
|
||||||
@ -59,4 +59,5 @@ class ExpungeScheduler(object):
|
|||||||
except:
|
except:
|
||||||
self.logger.exception('Exception occurred during expunge')
|
self.logger.exception('Exception occurred during expunge')
|
||||||
self.logger.info('Expunge thread sleeping for 24 hours')
|
self.logger.info('Expunge thread sleeping for 24 hours')
|
||||||
self.expunge_timer = threading.Timer(24*60*60, self.run_expunge, ())
|
self.expunge_timer = threading.Timer(
|
||||||
|
24 * 60 * 60, self.run_expunge, ())
|
||||||
|
@ -110,7 +110,7 @@ def wsexpose(*args, **kwargs):
|
|||||||
except (OperationalError, ResourceClosedError):
|
except (OperationalError, ResourceClosedError):
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
logger.warning(
|
logger.warning(
|
||||||
"Galera deadlock, retry {0}".format(x+1)
|
"Galera deadlock, retry {0}".format(x + 1)
|
||||||
)
|
)
|
||||||
args = old_args
|
args = old_args
|
||||||
kwargs = old_kwargs
|
kwargs = old_kwargs
|
||||||
|
@ -70,7 +70,7 @@ def client_job(logger, job_type, host, data, lbid):
|
|||||||
except OperationalError:
|
except OperationalError:
|
||||||
# Auto retry on galera locking error
|
# Auto retry on galera locking error
|
||||||
logger.warning(
|
logger.warning(
|
||||||
"Galera deadlock in gearman, retry {0}".format(x+1)
|
"Galera deadlock in gearman, retry {0}".format(x + 1)
|
||||||
)
|
)
|
||||||
except:
|
except:
|
||||||
logger.exception("Gearman thread unhandled exception")
|
logger.exception("Gearman thread unhandled exception")
|
||||||
|
14
setup.cfg
14
setup.cfg
@ -1,8 +1,3 @@
|
|||||||
[build_sphinx]
|
|
||||||
all_files = 1
|
|
||||||
build-dir = build/sphinx
|
|
||||||
source-dir = doc
|
|
||||||
|
|
||||||
[metadata]
|
[metadata]
|
||||||
name = libra
|
name = libra
|
||||||
author = David Shrewsbury <shrewsbury.dave@gmail.com>, Andrew Hutchings <andrew@linuxjedi.co.uk>
|
author = David Shrewsbury <shrewsbury.dave@gmail.com>, Andrew Hutchings <andrew@linuxjedi.co.uk>
|
||||||
@ -23,13 +18,14 @@ classifier =
|
|||||||
packages =
|
packages =
|
||||||
libra
|
libra
|
||||||
|
|
||||||
[global]
|
|
||||||
setup-hooks =
|
|
||||||
pbr.hooks.setup_hook
|
|
||||||
|
|
||||||
[entry_points]
|
[entry_points]
|
||||||
console_scripts =
|
console_scripts =
|
||||||
libra_worker = libra.worker.main:main
|
libra_worker = libra.worker.main:main
|
||||||
libra_pool_mgm = libra.mgm.mgm:main
|
libra_pool_mgm = libra.mgm.mgm:main
|
||||||
libra_api = libra.api.app:main
|
libra_api = libra.api.app:main
|
||||||
libra_admin_api = libra.admin_api.app:main
|
libra_admin_api = libra.admin_api.app:main
|
||||||
|
|
||||||
|
[build_sphinx]
|
||||||
|
all_files = 1
|
||||||
|
build-dir = build/sphinx
|
||||||
|
source-dir = doc
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
|
hacking>=0.5.6,<0.8
|
||||||
|
|
||||||
fixtures>=0.3.12
|
fixtures>=0.3.12
|
||||||
flake8
|
|
||||||
mock
|
mock
|
||||||
python-subunit
|
python-subunit
|
||||||
sphinx>=1.1.2
|
sphinx>=1.1.2
|
||||||
|
5
tox.ini
5
tox.ini
@ -13,11 +13,8 @@ downloadcache = ~/cache/pip
|
|||||||
deps = flake8
|
deps = flake8
|
||||||
commands = flake8
|
commands = flake8
|
||||||
|
|
||||||
[testenv:pyflakes]
|
|
||||||
deps = pyflakes
|
|
||||||
commands = pyflakes libra
|
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
|
ignore = H
|
||||||
show-source = True
|
show-source = True
|
||||||
exclude = .venv,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tests,build
|
exclude = .venv,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tests,build
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user