Page MenuHomeElementl

Fix sensor loop handle cleanup
ClosedPublic

Authored by dgibson on Mar 3 2021, 3:23 AM.

Details

Summary

TIL that pop_stack doesn't actually close the contextmanagers in the stack! https://docs.python.org/3/library/contextlib.html#contextlib.ExitStack.pop_all

I think what we actually want is close().

Resolves https://github.com/dagster-io/dagster/issues/3757.

Test Plan

Run daemon loop long enough that the pop_all is hit (>60 seconds), CTRL-C the daemon, daemon no longer hangs.

Diff Detail

Repository
R1 dagster
Lint
Lint Not Applicable
Unit
Tests Not Applicable