We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
octue logs
I'd like to be able to connect to a question running on a service revision at any given time and see the latest logs stream to me in real time.
I can use the get_events function and EventReplayer class periodically but this requires repeated manual execution.
get_events
EventReplayer
Add an octue logs CLI command that sets up a subscriber to the events of a question and displays them in real time.
The text was updated successfully, but these errors were encountered:
It could looks something like this
from octue.cloud.pub_sub import Subscription, Topic from octue.resources.service_backends import GCPPubSubBackend from octue.cloud.pub_sub.service import Service from octue.cloud.pub_sub.events import GoogleCloudPubSubEventHandler question_uuid = "facd9ada-f9be-4276-89bb-d114eb6a5302" topic = Topic(name="octue.services", project_name=PROJECT_NAME) subscription = Subscription( name=f"octue.services.gulfwindtech.dlc-service.add-real-dlc-ser.answers.{question_uuid}", topic=topic, filter=( f'attributes.question_uuid = "{question_uuid}" ' f'AND attributes.sender_type = "CHILD"' ), ) subscription.create() event_handler = GoogleCloudPubSubEventHandler( subscription=subscription, recipient=Service(backend=GCPPubSubBackend(project_name=PROJECT_NAME)), ) event_handler.handle_events() subscription.delete()
Sorry, something went wrong.
No branches or pull requests
Feature request
Use Case
I'd like to be able to connect to a question running on a service revision at any given time and see the latest logs stream to me in real time.
Current state
I can use the
get_events
function andEventReplayer
class periodically but this requires repeated manual execution.Proposed Solution
Add an
octue logs
CLI command that sets up a subscriber to the events of a question and displays them in real time.The text was updated successfully, but these errors were encountered: