Fix is_shutdown check when running in executor