예제 #1
0
 def run(self):
     ingestion.loop_ingestion(dry_run=self.dry_run)
예제 #2
0
service  = False

if service:
    # Make sure the pid dir exists
    if not os.path.isdir(es_constants.pid_file_dir):
        try:
            os.makedirs(es_constants.pid_file_dir)
        except os.error:
            logger.error("Cannot create pid directory")

    # Define pid file and create daemon
    pid_file = es_constants.ingestion_pid_filename
    daemon = acquisition.IngestionDaemon(pid_file, dry_run=dry_run)

    if do_start:
        if daemon.status():
            logger.info('Ingest process is running: Exit')
        else:
            logger.info('Ingest process is NOT running: Start it.')
            daemon.start()
    else:
        if not daemon.status():
            logger.info('Ingest process is NOT running: Exit')
        else:
            logger.info('Ingest process is running: Stop it.')
            daemon.stop()
else:
    ingestion.loop_ingestion(dry_run=dry_run)


예제 #3
0
    # Make sure the pid dir exists
    if not os.path.isdir(es_constants.pid_file_dir):
        try:
            os.makedirs(es_constants.pid_file_dir)
        except os.error:
            logger.error("Cannot create pid directory")

    # Define pid file and create daemon
    pid_file = es_constants.ingestion_pid_filename
    daemon = acquisition.IngestionDaemon(pid_file, dry_run=dry_run)

    if do_start:
        if daemon.status():
            logger.info('Ingest process is running: Exit')
        else:
            logger.info('Ingest process is NOT running: Start it.')
            daemon.start()
    else:
        if not daemon.status():
            logger.info('Ingest process is NOT running: Exit')

        else:
            logger.info('Ingest process is running: Stop it.')
            daemon.stop()
else:
    if only_prod is not None:
        ingestion.loop_ingestion(dry_run=dry_run, test_one_product=only_prod)
        logger.warning('Ingestion running for a single product: %s', only_prod)
    else:
        ingestion.loop_ingestion(dry_run=dry_run)
예제 #4
0
 def run(self):
     ingestion.loop_ingestion(dry_run=self.dry_run)