Add `pikerd` entry point

kivy_mainline_and_py3.8
Tyler Goodlet 2018-04-16 02:13:59 -04:00
parent 23ae71089f
commit 73ef95f42a
2 changed files with 13 additions and 0 deletions

View File

@ -35,6 +35,18 @@ def run(main, loglevel='info'):
log.debug("Exiting piker") log.debug("Exiting piker")
@click.command()
@click.option('--broker', '-b', default=DEFAULT_BROKER,
help='Broker backend to use')
@click.option('--loglevel', '-l', default='warning', help='Logging level')
def pikerd(broker, loglevel):
"""Spawn the piker daemon.
"""
from piker.brokers.core import _daemon_main
brokermod = get_brokermod(broker)
run(partial(_daemon_main, brokermod), loglevel)
@click.group() @click.group()
def cli(): def cli():
pass pass

View File

@ -31,6 +31,7 @@ setup(
entry_points={ entry_points={
'console_scripts': [ 'console_scripts': [
'piker = piker.cli:cli', 'piker = piker.cli:cli',
'pikerd = piker.cli:pikerd',
] ]
}, },
install_requires=[ install_requires=[