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

SW-699: removed obsolete test code

parent e5a038dd
No related branches found
No related tags found
No related merge requests found
......@@ -167,7 +167,7 @@ class IngestEventMessageHandlerForMomAdapter(IngestEventMessageHandler):
try:
msg = EventMessage(subject="%s.%s" % (INGEST_NOTIFICATION_PREFIX, subject), content=content_dict)
msg.ttl = 48*3600 #remove message from queue's when not picked up within 48 hours
logger.info('Sending notification %s: %s' % (subject, str(content_dict).replace('\n', ' ')))
logger.info('Sending notification %s to %s: %s' % (msg.subject, self._tobus.exchange, str(content_dict).replace('\n', ' ')))
self._tobus.send(msg)
except Exception as e:
logger.error(str(e))
......@@ -388,19 +388,8 @@ def main():
logger.info('*****************************************')
with IngestMomAdapter(mom_creds, options.exchange, options.broker, options.host, options.port) as adapter:
# create a job...
job_xml = createJobXml('project', 0, 1, 'dp_id', 2, '/tmp/path/to/dataproduct')
from pysimplesoap.client import SoapClient
# submit the job like MoM would via xml-rpc
soap_client = SoapClient(location=adapter.mom2ingest_adapter.server_url(), namespace="urn:pipeline.export")
soap_client.new_job(fileName='my_job_file.xml', fileContent=job_xml)
waitForInterrupt()
logger.info('Stopped IngestMomAdapter')
if __name__ == '__main__':
......
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