Skip to content

Commit

Permalink
feat(cli/event): Implement promisc flag
Browse files Browse the repository at this point in the history
We have API promisc flag for pub/sub events, and it is
useful to have it available in cli too, to listen for all
events on api instance.

Signed-off-by: Denys Fedoryshchenko <[email protected]>
  • Loading branch information
nuclearcat committed Nov 13, 2024
1 parent df3108f commit 2e01db8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kernelci/cli/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@
def kci_event():
"""Interact with Pub/Sub and message queue events"""


@kci_event.command(secrets=True)

Check warning on line 27 in kernelci/cli/event.py

View workflow job for this annotation

GitHub Actions / Lint

expected 2 blank lines, found 1
@click.argument('channel')
@click.option('--promisc', help="Subscribe to all users", is_flag=True)
@Args.config

Check failure on line 30 in kernelci/cli/event.py

View workflow job for this annotation

GitHub Actions / Lint

Access to generic instance variables via class is ambiguous [misc]
@Args.api

Check failure on line 31 in kernelci/cli/event.py

View workflow job for this annotation

GitHub Actions / Lint

Access to generic instance variables via class is ambiguous [misc]
@catch_error
def subscribe(config, api, channel, secrets):
def subscribe(config, api, channel, secrets, promisc):
"""Subscribe to a Pub/Sub channel"""
api = get_api(config, api, secrets)
sub_id = api.subscribe(channel)
sub_id = api.subscribe(channel, promisc)
click.echo(sub_id)


Expand Down

0 comments on commit 2e01db8

Please sign in to comment.