-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
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
[CT-1928] Support passing event callbacks to EventManager via dbtRunner #6763
Comments
My have to add a method to add a callback to |
Hey, the current implementation in #7214 seems to wait for the callbacks to be processed before continuing with the invocation. Let me share an example: from dbt.cli.main import dbtRunner, list
from dbt.events.base_types import EventMsg
import time
def print_callback(event: EventMsg):
print("Sleeping")
time.sleep(2)
print("Got an event:", event.info.name, event)
dbt = dbtRunner(callbacks=[print_callback])
dbt.invoke(['list']) This takes 30 seconds to run because it waits for the Is this an implementation detail that may change in the future or as intended? |
Accept event callbacks as part of
dbtRunner
's constructor and use them to setup theEventManager
for programmatic invocations of dbt.The text was updated successfully, but these errors were encountered: