import argparse
import logging

from aiohttp import web

from maps_adv.stat_tasks_starter.lib import Application

parser = argparse.ArgumentParser("Stat tasks starter http server")
parser.add_argument("--port")


def main():
    logging.basicConfig(level=logging.DEBUG)
    args = parser.parse_args()

    app = Application()
    web.run_app(app.api, port=args.port)


if __name__ == "__main__":
    main()
