From 753d0d48bf0fe2ef11bbfa37e6c0cf8f7d5fa292 Mon Sep 17 00:00:00 2001 From: Hugo Herter Date: Thu, 4 Jul 2024 15:38:30 +0200 Subject: [PATCH] Fix: AttributeError: 'MicroVM' object has no attribute 'send_shutdown_message' Error reported on https://github.com/aleph-im/aleph-vm/issues/652 --- src/aleph/vm/controllers/__main__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/aleph/vm/controllers/__main__.py b/src/aleph/vm/controllers/__main__.py index 62639ee8..3232c82b 100644 --- a/src/aleph/vm/controllers/__main__.py +++ b/src/aleph/vm/controllers/__main__.py @@ -86,6 +86,7 @@ async def handle_persistent_vm(config: Configuration, execution: Union[MicroVM, def callback(): """Callback for the signal handler to stop the VM and cleanup properly on SIGTERM.""" loop.create_task(execution.teardown()) + loop.add_signal_handler(signal.SIGTERM, callback) await process.wait()