change param syntax
parent
2ff92c4165
commit
dabef46774
|
@ -4,7 +4,7 @@ import argparse
|
||||||
|
|
||||||
import pika
|
import pika
|
||||||
|
|
||||||
from rmq_params import rmq_params
|
from params import rmq_params, socket_params
|
||||||
|
|
||||||
def checkpoint(message):
|
def checkpoint(message):
|
||||||
"""Prints [CHeckpoint] <message>
|
"""Prints [CHeckpoint] <message>
|
||||||
|
@ -30,9 +30,9 @@ def main():
|
||||||
parser = argparse.ArgumentParser(description='Processses arguments')
|
parser = argparse.ArgumentParser(description='Processses arguments')
|
||||||
parse.add_argument('-s', help='Set server IP or hostname', required=True)
|
parse.add_argument('-s', help='Set server IP or hostname', required=True)
|
||||||
parse.add_argument('-p', help='Set server Port to receive messages on',
|
parse.add_argument('-p', help='Set server Port to receive messages on',
|
||||||
default=8080)
|
default=socket_params['port'])
|
||||||
parse.add_argument('-z', help='Set size for socket to recive messages',
|
parse.add_argument('-z', help='Set size for socket to recive messages',
|
||||||
default=1024)
|
default=socket_params['size'])
|
||||||
|
|
||||||
# Process args
|
# Process args
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
|
@ -7,3 +7,5 @@ rmq_params = {'vhost': 'my_vhost',
|
||||||
'password': 'pass',
|
'password': 'pass',
|
||||||
'exchange': 'my_exchange',
|
'exchange': 'my_exchange',
|
||||||
'order_queue': 'my_order_queue'}
|
'order_queue': 'my_order_queue'}
|
||||||
|
socket_params = {'size': 1024,
|
||||||
|
'port': 8080}
|
Loading…
Reference in New Issue