From 5a4e2701df48b091ad3ae4fd37c8d1b9ac5a6e81 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Fri, 18 Mar 2022 21:46:41 -0500 Subject: [PATCH] Tweak default luigi config; allow specifying version to accommodate one particular install, but is generally okay i think.. --- rattail_fabric2/deploy/luigi/luigi.cfg.mako | 26 ++++++++++----------- rattail_fabric2/luigi.py | 4 ++-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/rattail_fabric2/deploy/luigi/luigi.cfg.mako b/rattail_fabric2/deploy/luigi/luigi.cfg.mako index da7c25b..8dd1ee1 100644 --- a/rattail_fabric2/deploy/luigi/luigi.cfg.mako +++ b/rattail_fabric2/deploy/luigi/luigi.cfg.mako @@ -9,22 +9,22 @@ <%text>############################################################ -# [core] +[core] -# # Number of seconds to wait before timing out when making an API call. Defaults -# # to 10.0 -# # (sometimes things can lag for us and we simply need to give it more time) -# rpc_connect_timeout = 60 +# Number of seconds to wait before timing out when making an API call. Defaults +# to 10.0 +# (sometimes things can lag for us and we simply need to give it more time) +rpc_connect_timeout = 60 -# # The maximum number of retries to connect the central scheduler before giving -# # up. Defaults to 3 -# # (occasional network issues seem to cause us to need more/longer retries) -# rpc_retry_attempts = 10 +# The maximum number of retries to connect the central scheduler before giving +# up. Defaults to 3 +# (occasional network issues seem to cause us to need more/longer retries) +rpc_retry_attempts = 10 -# # Number of seconds to wait before the next attempt will be started to connect -# # to the central scheduler between two retry attempts. Defaults to 30 -# # (occasional network issues seem to cause us to need more/longer retries) -# rpc_retry_wait = 60 +# Number of seconds to wait before the next attempt will be started to connect +# to the central scheduler between two retry attempts. Defaults to 30 +# (occasional network issues seem to cause us to need more/longer retries) +rpc_retry_wait = 60 [scheduler] state_path = ${appdir}/luigi/state.pickle diff --git a/rattail_fabric2/luigi.py b/rattail_fabric2/luigi.py index 240bdd1..1414286 100644 --- a/rattail_fabric2/luigi.py +++ b/rattail_fabric2/luigi.py @@ -32,7 +32,7 @@ from rattail_fabric2 import make_deploy, mkdir deploy_common = make_deploy(__file__) -def install_luigi(c, envroot, user='rattail', db_connection=None): +def install_luigi(c, envroot, luigi='luigi', user='rattail', db_connection=None): """ Install and configure Luigi to the given virtualenv. """ @@ -41,7 +41,7 @@ def install_luigi(c, envroot, user='rattail', db_connection=None): appdir = '{}/app'.format(envroot) # package - c.sudo("bash -lc 'workon {} && pip install luigi'".format(envname), + c.sudo("""bash -lc "workon {} && pip install '{}'" """.format(envname, luigi), user=user) # dirs