Skip to content
Snippets Groups Projects
Commit 9cd34e48 authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

Task #10057: minor fix.

parent 8ef52138
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ import logging
import os.path
import socket
import subprocess
import time
from datetime import datetime
from optparse import OptionParser
from lofar.messaging import Service
......@@ -180,7 +181,7 @@ class CleanupHandler(MessageHandlerInterface):
ingestable_dataproducts = [dp for dp in dataproducts if dp['status'] not in [None, 'has_data', 'aborted'] ]
ingested_dataproducts = [dp for dp in dataproducts if dp['status'] == 'ingested']
if len(ingested_dataproducts) != len(dataproducts) and len(dataproducts) > 0 and len(ingestable_dataproducts) > 0:
if len(ingested_dataproducts) != len(ingestable_dataproducts) and len(dataproducts) > 0 and len(ingestable_dataproducts) > 0:
logger.info('ingestable_dataproducts: %s', ingestable_dataproducts)
message = "Task otdb_id=%s has un-ingested dataproducts. Not deleting data." % (task['otdb_id'],)
logger.error(message)
......@@ -338,6 +339,9 @@ class CleanupHandler(MessageHandlerInterface):
'message': 'Failed to delete (part of) %s' % path,
'path': path }
def createService(busname=DEFAULT_BUSNAME, servicename=DEFAULT_SERVICENAME, broker=None,
mountpoint=CEP4_DATA_MOUNTPOINT, verbose=False,
radb_busname=RADB_BUSNAME, radb_servicename=RADB_SERVICENAME,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment