#!/usr/bin/env python
import logging
import argparse

from blocks_extras.extensions.synchronization import SynchronizeController

if __name__ == '__main__':
    parser = argparse.ArgumentParser("Starts a synchronization controller")
    parser.add_argument("--port", type=int,
                        help="Port for listening")
    args = parser.parse_args()

    logging.basicConfig(level='INFO')
    controller = SynchronizeController(control_port=args.port)
    controller.serve()
