Skip to content

Commit

Permalink
Merge pull request #222 from cta-observatory/no_osadb
Browse files Browse the repository at this point in the history
Update the osa database only if the file is defined in the cfg file
  • Loading branch information
morcuended authored Apr 18, 2023
2 parents db49416 + b6e00db commit 86b9b6b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion osa/scripts/closer.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ def post_process(seq_tuple):
merge_files(seq_list, data_level="DL2")

if options.seqtoclose is None:
osadb.end_processing(date_to_iso(options.date))
database = cfg.get("database", "path")
if database:
osadb.end_processing(date_to_iso(options.date))
# Creating closing flag files will be deprecated in future versions
return set_closed_with_file()

Expand Down
5 changes: 4 additions & 1 deletion osa/scripts/sequencer.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ def single_process(telescope):
-------
sequence_list : list
"""
osadb.start_processing(date_to_iso(options.date))

database = cfg.get("database", "path")
if database:
osadb.start_processing(date_to_iso(options.date))

# Define global variables and create night directory
sequence_list = []
Expand Down

0 comments on commit 86b9b6b

Please sign in to comment.