+def process(market_id, market_config, user_id, report_path, args, pg_config):
+ try:
+ market.Market\
+ .from_config(market_config, args,
+ pg_config=pg_config, market_id=market_id,
+ user_id=user_id, report_path=report_path)\
+ .process(args.action, before=args.before, after=args.after)
+ except Exception as e:
+ print("{}: {}".format(e.__class__.__name__, e))
+