#!/usr/bin/env python
# -*- coding:utf-8 -*-

import logging
import os

from amqpdispatcher.dispatcher_common import get_args_from_cli
from amqpdispatcher.dispatcher_haigha import main as main_haigha
from amqpdispatcher.dispatcher_pika import main as main_pika
from amqpdispatcher.validate import validate


def main():
    if os.getenv('LOGGING_FILE_CONFIG'):
        logging.config.fileConfig(os.getenv('LOGGING_FILE_CONFIG'))
    else:
        logformat = "[%(asctime)s] %(name)s [pid:%(process)d] - %(levelname)s - %(message)s"
        datefmt = "%Y-%m-%d %H:%M:%S"
        logging.basicConfig(level=logging.DEBUG, format=logformat, datefmt=datefmt)

    args = get_args_from_cli()
    if args.validate:
        return validate(args.config)

    logger = logging.getLogger('amqp-dispatcher')
    logger.info('Connection: {0}'.format(args.connection))
    if args.connection == 'pika':
        return main_pika()
    return main_haigha()

if __name__ == '__main__':
    main()

e68ca386ef8144bc3ea3ecd4437d2d3e9cce4963
<mask token>

<mask token>


def main():
    if os.getenv('LOGGING_FILE_CONFIG'):
        logging.config.fileConfig(os.getenv('LOGGING_FILE_CONFIG'))
    else:
        logformat = (
            '[%(asctime)s] %(name)s [pid:%(process)d] - %(levelname)s - %(message)s'
            )
        datefmt = '%Y-%m-%d %H:%M:%S'
        logging.basicConfig(level=logging.DEBUG, format=logformat, datefmt=
            datefmt)
    args = get_args_from_cli()
    if args.validate:
        return validate(args.config)
    logger = logging.getLogger('amqp-dispatcher')
    logger.info('Connection: {0}'.format(args.connection))
    if args.connection == 'pika':
        return main_pika()
    return main_haigha()


<mask token>

<mask token>


def main():
    if os.getenv('LOGGING_FILE_CONFIG'):
        logging.config.fileConfig(os.getenv('LOGGING_FILE_CONFIG'))
    else:
        logformat = (
            '[%(asctime)s] %(name)s [pid:%(process)d] - %(levelname)s - %(message)s'
            )
        datefmt = '%Y-%m-%d %H:%M:%S'
        logging.basicConfig(level=logging.DEBUG, format=logformat, datefmt=
            datefmt)
    args = get_args_from_cli()
    if args.validate:
        return validate(args.config)
    logger = logging.getLogger('amqp-dispatcher')
    logger.info('Connection: {0}'.format(args.connection))
    if args.connection == 'pika':
        return main_pika()
    return main_haigha()


if __name__ == '__main__':
    main()

import logging
import os
from amqpdispatcher.dispatcher_common import get_args_from_cli
from amqpdispatcher.dispatcher_haigha import main as main_haigha
from amqpdispatcher.dispatcher_pika import main as main_pika
from amqpdispatcher.validate import validate


def main():
    if os.getenv('LOGGING_FILE_CONFIG'):
        logging.config.fileConfig(os.getenv('LOGGING_FILE_CONFIG'))
    else:
        logformat = (
            '[%(asctime)s] %(name)s [pid:%(process)d] - %(levelname)s - %(message)s'
            )
        datefmt = '%Y-%m-%d %H:%M:%S'
        logging.basicConfig(level=logging.DEBUG, format=logformat, datefmt=
            datefmt)
    args = get_args_from_cli()
    if args.validate:
        return validate(args.config)
    logger = logging.getLogger('amqp-dispatcher')
    logger.info('Connection: {0}'.format(args.connection))
    if args.connection == 'pika':
        return main_pika()
    return main_haigha()


if __name__ == '__main__':
    main()

#!/usr/bin/env python
# -*- coding:utf-8 -*-

import logging
import os

from amqpdispatcher.dispatcher_common import get_args_from_cli
from amqpdispatcher.dispatcher_haigha import main as main_haigha
from amqpdispatcher.dispatcher_pika import main as main_pika
from amqpdispatcher.validate import validate


def main():
    if os.getenv('LOGGING_FILE_CONFIG'):
        logging.config.fileConfig(os.getenv('LOGGING_FILE_CONFIG'))
    else:
        logformat = "[%(asctime)s] %(name)s [pid:%(process)d] - %(levelname)s - %(message)s"
        datefmt = "%Y-%m-%d %H:%M:%S"
        logging.basicConfig(level=logging.DEBUG, format=logformat, datefmt=datefmt)

    args = get_args_from_cli()
    if args.validate:
        return validate(args.config)

    logger = logging.getLogger('amqp-dispatcher')
    logger.info('Connection: {0}'.format(args.connection))
    if args.connection == 'pika':
        return main_pika()
    return main_haigha()

if __name__ == '__main__':
    main()
