fix crashing on shutdown from backup thread
fix crashing on shutdown from backup thread: a task in Trending-SWE1.0 (Harbor dataset). Title: fix crashing on shutdown from backup thread
The task
**Title:** fix crashing on shutdown from backup thread
Part of scalingX/Trending-SWE1.0.