Skip to content

Commit 2dfb42b

Browse files
committed
Fix: Error fetching message from vm-connector for start_watch_for_messages_task
Jira ticket : ALEPH-111 Problem: When aleph-vm was starting if the vm-connector couldn't connect to the pyaleph API , the startup crashed and systemd restarted it in a loop. Solution: Stop registering the sample program at startup, so the pyaleph api don't need to be reached at startup. This code was left as a demo but it didn't really do anything at the moment. We have just commented the code if we want to reuse it in the future. Note: A more complete and long analysis of the problem, along with propsed solution is on the JIRA ticket https://aleph-im.atlassian.net/browse/ALEPH-111?focusedCommentId=10008
1 parent 49d91d2 commit 2dfb42b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/aleph/vm/orchestrator/tasks.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,12 @@ async def start_watch_for_messages_task(app: web.Application):
123123

124124
# Register an hardcoded initial program
125125
# TODO: Register all programs with subscriptions
126-
sample_message, _ = await load_updated_message(
127-
ref=ItemHash("cad11970efe9b7478300fd04d7cc91c646ca0a792b9cc718650f86e1ccfac73e")
128-
)
129-
if isinstance(sample_message, ProgramMessage):
130-
assert sample_message.content.on.message, sample_message
131-
reactor.register(sample_message)
126+
# sample_message, _ = await load_updated_message(
127+
# ref=ItemHash("cad11970efe9b7478300fd04d7cc91c646ca0a792b9cc718650f86e1ccfac73e")
128+
# )
129+
# if isinstance(sample_message, ProgramMessage):
130+
# assert sample_message.content.on.message, sample_message
131+
# reactor.register(sample_message)
132132

133133
app["pubsub"] = pubsub
134134
app["reactor"] = reactor

0 commit comments

Comments
 (0)