# Path: mrq/version.py
# VERSION = "0.9.10"
# 
# Path: mrq/utils.py
# def get_local_ip():
#     """ Returns the local IP. Can be overwritten in the config with --local-ip so don't call
#     this function directly, instead get the current value from the config """
#     import socket
#     try:
#         return socket.gethostbyname(socket.gethostname())
#     except:  # pylint: disable=bare-except
#         return "127.0.0.1"


from future.builtins import str
from .version import VERSION
from .utils import get_local_ip
import argparse
import os
import sys
import re
import psutil
import atexit
import logging
        import cProfile, pstats

    for part in sources:
        for name in config_keys:

            if part == "env":
                value = os.environ.get(env_prefix + name.upper())
                if value:
                    if name == "queues":
                        value = re.split("\s+", value)
                    if parser_types.get(name):
                        value = parser_types[name](value)
                    merged_config[name] = value
            elif part == "args" and name in from_args:
                merged_config[name] = from_args[name]
            elif part == "file" and name in from_file:
                merged_config[name] = from_file[name]

    if extra:
        merged_config.update(extra)

    if merged_config["profile"]:
        profiler = cProfile.Profile()
        profiler.enable()

        def print_profiling():
            pstats.Stats(profiler).sort_stats("cumulative").print_stats()

        atexit.register(print_profiling)

    if merged_config["version"]:

# Path: mrq/version.py
# VERSION = "0.9.10"
# 
# Path: mrq/utils.py
# def get_local_ip():
#     """ Returns the local IP. Can be overwritten in the config with --local-ip so don't call
#     this function directly, instead get the current value from the config """
#     import socket
#     try:
#         return socket.gethostbyname(socket.gethostname())
#     except:  # pylint: disable=bare-except
#         return "127.0.0.1"


# Path: mrq/config.py
from future.builtins import str
from .version import VERSION
from .utils import get_local_ip
import argparse
import os
import sys
import re
import psutil
import atexit
import logging
        import cProfile, pstats


    for part in sources:
        for name in config_keys:

            if part == "env":
                value = os.environ.get(env_prefix + name.upper())
                if value:
                    if name == "queues":
                        value = re.split("\s+", value)
                    if parser_types.get(name):
                        value = parser_types[name](value)
                    merged_config[name] = value
            elif part == "args" and name in from_args:
                merged_config[name] = from_args[name]
            elif part == "file" and name in from_file:
                merged_config[name] = from_file[name]

    if extra:
        merged_config.update(extra)

    if merged_config["profile"]:
        profiler = cProfile.Profile()
        profiler.enable()

        def print_profiling():
            pstats.Stats(profiler).sort_stats("cumulative").print_stats()

        atexit.register(print_profiling)

    if merged_config["version"]:

        print("MRQ version: %s" % VERSION)