f add conditions to batches

This commit is contained in:
jrconlin 2020-08-24 16:00:47 +00:00
parent 714168d107
commit 8cfbb8510c
No known key found for this signature in database
GPG Key ID: D2B33CD056ABD330

View File

@ -103,7 +103,11 @@ def spanner_purge(args):
if args.mode in ["batches", "both"]:
# Delete Batches. Also deletes child batch_bsos rows (INTERLEAVE
# IN PARENT batches ON DELETE CASCADE)
batch_query = 'DELETE FROM batches WHERE {}'.format(expiry_condition)
batch_query = add_conditions(
args,
'DELETE FROM batches WHERE {}'.format(expiry_condition),
prefix,
)
deleter(
database,
name="batches",