Skip to content

Commit cec5eb3

Browse files
Vladimir Kotalahornace
authored andcommitted
share the OPENGROK_NO_MIRROR env var definition
1 parent 9dbe65d commit cec5eb3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

docker/start.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
from opengrok_tools.utils.readconfig import read_config
4949
from opengrok_tools.utils.exitvals import SUCCESS_EXITVAL
5050
from opengrok_tools.utils.mirror import check_configuration
51+
from opengrok_tools.mirror import OPENGROK_NO_MIRROR_ENV
5152

5253

5354
fs_root = os.path.abspath('.').split(os.path.sep)[0] + os.path.sep
@@ -496,7 +497,7 @@ def main():
496497
logger.info("extra indexer options: {}".format(extra_indexer_options))
497498
env['OPENGROK_INDEXER_OPTIONAL_ARGS'] = extra_indexer_options
498499
if os.environ.get(NOMIRROR_ENV_NAME):
499-
env['OPENGROK_NO_MIRROR'] = os.environ.get(NOMIRROR_ENV_NAME)
500+
env[OPENGROK_NO_MIRROR_ENV] = os.environ.get(NOMIRROR_ENV_NAME)
500501
logger.debug('Extra environment: {}'.format(env))
501502

502503
use_projects = True

tools/src/main/python/opengrok_tools/mirror.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@
6060

6161
__version__ = "1.1"
6262

63+
OPENGROK_NO_MIRROR_ENV = "OPENGROK_NO_MIRROR"
64+
6365

6466
def worker(args):
6567
project_name, logdir, loglevel, backupcount, config, check_changes, uri, \
@@ -134,7 +136,7 @@ def main():
134136
logger.debug("Configuration check passed, exiting")
135137
return 0
136138

137-
nomirror = os.environ.get("OPENGROK_NO_MIRROR")
139+
nomirror = os.environ.get(OPENGROK_NO_MIRROR_ENV)
138140
if nomirror and len(nomirror) > 0:
139141
logger.debug("skipping mirror based on the OPENGROK_NO_MIRROR " +
140142
"environment variable")

0 commit comments

Comments
 (0)