Skip to content
Snippets Groups Projects
Commit 4608cf7d authored by Sybren A. Stüvel's avatar Sybren A. Stüvel
Browse files

Added `--version` CLI option to show the version of Flamenco Worker

parent cd60e1ca
No related branches found
Tags
No related merge requests found
...@@ -14,6 +14,7 @@ changed functionality, fixed bugs). ...@@ -14,6 +14,7 @@ changed functionality, fixed bugs).
This is only supported on POSIX platforms that have those signals. This is only supported on POSIX platforms that have those signals.
- Worker can be told to shut down by the Manager. The environment (for example systemd - Worker can be told to shut down by the Manager. The environment (for example systemd
on Linux) is responsible for restarting Flamenco Worker after such a shutdown. on Linux) is responsible for restarting Flamenco Worker after such a shutdown.
- Added `--version` CLI option to show the version of Flamenco Worker and quit.
## Version 2.0.8 (released 2017-09-07) ## Version 2.0.8 (released 2017-09-07)
......
...@@ -17,6 +17,8 @@ def main(): ...@@ -17,6 +17,8 @@ def main():
parser.add_argument('-v', '--verbose', action='store_true', parser.add_argument('-v', '--verbose', action='store_true',
help='Show configuration before starting, ' help='Show configuration before starting, '
'and asyncio task status at shutdown.') 'and asyncio task status at shutdown.')
parser.add_argument('-V', '--version', action='store_true',
help='Show the version of Flamenco Worker and stops.')
parser.add_argument('-r', '--reregister', action='store_true', parser.add_argument('-r', '--reregister', action='store_true',
help="Erases authentication information and re-registers this worker " help="Erases authentication information and re-registers this worker "
"at the Manager. WARNING: this can cause duplicate worker information " "at the Manager. WARNING: this can cause duplicate worker information "
...@@ -27,6 +29,11 @@ def main(): ...@@ -27,6 +29,11 @@ def main():
"for more powerful options.") "for more powerful options.")
args = parser.parse_args() args = parser.parse_args()
if args.version:
from . import __version__
print(__version__)
raise SystemExit()
# Load configuration # Load configuration
from . import config from . import config
confparser = config.load_config(args.config, args.verbose) confparser = config.load_config(args.config, args.verbose)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment