docs: def main(args, stop=False):
      """
      Arguments parsing, etc..
      """
      daemon = AMQPDaemon(
          con_param=getConParams(
              settings.RABBITMQ_CALIBRE_VIRTUALHOST
          ),
          queue=settings.RABBITMQ_CALIBRE_INPUT_QUEUE,
          out_exch=settings.RABBITMQ_CALIBRE_EXCHANGE,
          out_key=settings.RABBITMQ_CALIBRE_OUTPUT_KEY,
          react_fn=reactToAMQPMessage,
          glob=globals()                # used in deserializer
      )
  
      if not stop and args.foreground:  # run at foreground
          daemon.run()
      else:
          daemon.run_daemon()