Skip to content
Snippets Groups Projects
Commit a74d182c authored by Bo-Chun Chen's avatar Bo-Chun Chen
Browse files

Add get_args function in rc_util

parent a6c61e0b
No related branches found
No related tags found
1 merge request!18Redesign RabbitMQ
import argparse
from rc_rmq import RCRMQ from rc_rmq import RCRMQ
import json import json
...@@ -44,3 +45,10 @@ def consume(username, callback=worker, debug=False): ...@@ -44,3 +45,10 @@ def consume(username, callback=worker, debug=False):
rc_rmq.disconnect() rc_rmq.disconnect()
return { 'success' : True } return { 'success' : True }
def get_args():
# Parse arguments
parser = argparse.ArgumentParser()
parser.add_argument('-v', '--verbose', action='store_true', help='verbose output')
parser.add_argument('-n', '--dry-run', action='store_true', help='enable dry run mode')
return parser.parse_args()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment