forked from uncloud/uncloud
[metadata] allow passing in the port
This commit is contained in:
parent
eb19b10333
commit
b95037f624
2 changed files with 6 additions and 2 deletions
|
@ -41,9 +41,13 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
scheduler_parser = subparsers.add_parser("scheduler", parents=[parent_parser])
|
scheduler_parser = subparsers.add_parser("scheduler", parents=[parent_parser])
|
||||||
|
|
||||||
|
|
||||||
filescanner_parser = subparsers.add_parser("filescanner")
|
filescanner_parser = subparsers.add_parser("filescanner")
|
||||||
imagescanner_parser = subparsers.add_parser("imagescanner")
|
imagescanner_parser = subparsers.add_parser("imagescanner")
|
||||||
|
|
||||||
metadata_parser = subparsers.add_parser("metadata")
|
metadata_parser = subparsers.add_parser("metadata")
|
||||||
|
metadata_parser.add_argument("--port", "-p")
|
||||||
|
|
||||||
config_parser = subparsers.add_parser("configure")
|
config_parser = subparsers.add_parser("configure")
|
||||||
|
|
||||||
configure_parser(config_parser)
|
configure_parser(config_parser)
|
||||||
|
|
|
@ -111,8 +111,8 @@ class Root(Resource):
|
||||||
api.add_resource(Root, "/")
|
api.add_resource(Root, "/")
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main(port=None):
|
||||||
app.run(debug=True, host="::", port="80")
|
app.run(debug=True, host="::", port=port)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Reference in a new issue