Skip to content
Snippets Groups Projects
Commit ee574198 authored by Robert Bruntz's avatar Robert Bruntz
Browse files

Merge branch 'remove-S6_SEGMENT_SERVER' into 'master'

Replace S6_SEGMENT_SERVER with DEFAULT_SEGMENT_SERVER

See merge request !115
parents 8e5a3bfd 5e718841
No related branches found
No related tags found
1 merge request!115Replace S6_SEGMENT_SERVER with DEFAULT_SEGMENT_SERVER
Pipeline #595003 passed
......@@ -132,7 +132,7 @@ def parse_command_line():
# Data location options
parser.add_option("-t", "--segment-url", metavar = "segment_url", help = "Segment URL. Users have to specify either 'https://' for a secure connection or 'http://' for an insecure connection to the segment database URL. For example, '--segment-url=https://segments.ligo.org'. No need to specify port number. ")
parser.add_option("-d", "--database", metavar = "use_database", action = "store_true", help = "Use database specified by environment variable S6_SEGMENT_SERVER. For example, 'S6_SEGMENT_SERVER=https://segdb.ligo.caltech.edu'")
parser.add_option("-d", "--database", metavar = "use_database", action = "store_true", help = "Use database specified by environment variable DEFAULT_SEGMENT_SERVER. For example, 'DEFAULT_SEGMENT_SERVER=https://segments.ligo.org'")
parser.add_option("-f", "--dmt-files", metavar = "use_files", action = "store_true", help = "Use files in directory specified by environment variable ONLINEDQ, for example, 'ONLINEDQ=file:///path_to_dmt'. 'file://' is the prefix, the actual directory to DMT xml files starts with '/'.")
......@@ -186,9 +186,12 @@ def parse_command_line():
outfile.close()
file_location = tmp_dir
elif options.database:
if 'S6_SEGMENT_SERVER' not in os.environ:
raise ValueError( "--database specified but S6_SEGMENT_SERVER not set" )
database_location = os.environ['S6_SEGMENT_SERVER']
try:
database_location = os.environ['DEFAULT_SEGMENT_SERVER']
except KeyError:
raise ValueError(
"--database specified but DEFAULT_SEGMENT_SERVER not set",
)
elif options.dmt_files:
if 'ONLINEDQ' not in os.environ:
raise ValueError( "--dmt-files specified but ONLINEDQ not set" )
......
......@@ -109,7 +109,7 @@ def parse_command_line():
parser.add_option("-k", "--keep-db", metavar = "keep_db", action = "store_true", help = "Keep sqlite database (don't delete it when the script exits).")
parser.add_option("-r", "--remove-definer-table", action = "store_true", help = "If set, the veto definer table will not be included in the output.")
parser.add_option("-t", "--segment-url", metavar = "segment_url", help = "Segment URL, e.g., https://segments.ligo.org .")
parser.add_option("-d", "--database", metavar = "use_database", action = "store_true", help = "Use database specified by environment variable S6_SEGMENT_SERVER.")
parser.add_option("-d", "--database", metavar = "use_database", action = "store_true", help = "Use database specified by environment variable DEFAULT_SEGMENT_SERVER.")
parser.add_option("-f", "--dmt-file", metavar = "use_files", action = "store_true", help = "Warning: NOT UPDATED FOR DQSEGDB CLIENT YET! use files in directory specified by environment variable ONLINEDQ.")
parser.add_option("-c", "--cumulative-categories", action = "store_true", help = "If set, the category N files will contain all segments in categories <= N.")
parser.add_option("-p", "--separate-categories", action = "store_true", help = "If set, the category N files will contain only category N.")
......@@ -187,9 +187,12 @@ def parse_command_line():
outfile.close()
file_location = tmp_dir
elif options.database:
if 'S6_SEGMENT_SERVER' not in os.environ:
raise ValueError( "--database specified by S6_SEGMENT_SERVER not set" )
database_location = os.environ['S6_SEGMENT_SERVER']
try:
database_location = os.environ['DEFAULT_SEGMENT_SERVER']
except KeyError:
raise ValueError(
"--database specified by DEFAULT_SEGMENT_SERVER not set",
)
elif options.dmt_file:
# Fix!!! Easy to add dmt files and s6 server compatibility, but requires time to test them before deploying them!
raise ValueError("DMT files method not yet suppported for this client in ER6, please use ligolw_segments_from_cats (S6 client)")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment