Skip to content

Commit c731942

Browse files
committed
🐛 tutorials: fix setup for zeromq broker rename
The zmq -> zeromq broker refactor renamed the public broker class, its entry point, and its status API. include/setup_tutorial.py still used the old names, so it raised during import and profile creation, leaving gsrd_code undefined and breaking every module's notebook execution both locally and on ReadTheDocs. - ZmqBroker -> ZeromqBroker (import and isinstance check) - broker entry point core.zmq -> core.zeromq - broker.is_running -> broker.check_service_reachable()
1 parent f83c156 commit c731942

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

docs/source/tutorials/include/setup_tutorial.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
from contextlib import suppress
3434

3535
from aiida import load_profile
36-
from aiida.brokers import ZmqBroker
36+
from aiida.brokers import ZeromqBroker
3737
from aiida.common.exceptions import NotExistent
3838
from aiida.engine import get_daemon_client
3939
from aiida.engine.daemon.client import DaemonNotRunningException
@@ -75,7 +75,7 @@
7575
email='tutorial@aiida.net',
7676
storage_backend='core.sqlite_dos',
7777
storage_config={},
78-
broker_backend='core.zmq',
78+
broker_backend='core.zeromq',
7979
broker_config={},
8080
)
8181
config.set_option('runner.poll.interval', 1, scope=profile_name)
@@ -95,9 +95,9 @@
9595
# `start_daemon` only waits for circusd itself, not for its child watchers,
9696
# so a verdi status call right after can still see "Broker is NOT running".
9797
_broker = get_manager().get_broker()
98-
if isinstance(_broker, ZmqBroker):
98+
if isinstance(_broker, ZeromqBroker):
9999
_deadline = time.monotonic() + 10.0
100-
while not _broker.is_running and time.monotonic() < _deadline:
100+
while not _broker.check_service_reachable() and time.monotonic() < _deadline:
101101
time.sleep(0.2)
102102

103103
# Ensure a localhost Computer exists (create_profile does not create one,

0 commit comments

Comments
 (0)