Skip to content

Commit

Permalink
Merge pull request #271 from sot/fix-server-sync-zero-rows-in-archfile
Browse files Browse the repository at this point in the history
Require at least one row of data in full data for server sync
  • Loading branch information
taldcroft authored Feb 7, 2025
2 parents 3d2f925 + 23ba4b7 commit 5ce8dec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cheta/update_server_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,13 @@ def update_index_file(index_file, opt, logger):
f"filetime > {DateTime(filetime0).fits[:-4]} {filetime0} "
f"filetime <= {DateTime(filetime1).fits[:-4]} {filetime1} "
)
# Require files in time range and which have at least one row of data. It
# can happen that L0 files are created but with zero rows.
archfiles = dbi.fetchall(
"select * from archfiles "
f"where filetime > {filetime0} "
f"and filetime <= {filetime1} "
"and rowstop > rowstart "
"order by filetime "
)

Expand Down

0 comments on commit 5ce8dec

Please sign in to comment.