Add missing null check when unloading partition manager (#5817)
## What changed?
<!-- Describe what has changed in this PR -->
Fix panic when the partition being unloaded is not found in the map.
## Why?
<!-- Tell your future self why have you made these changes -->
## How did you test it?
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
## Potential risks
<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
## Documentation
<!-- Have you made sure this change doesn't falsify anything currently
stated in `docs/`? If significant
new behavior is added, have you described that in `docs/`? -->
## Is hotfix candidate?
<!-- Is this PR a hotfix candidate or does it require a notification to
be sent to the broader community? (Yes/No) -->
5709cbf...
by
Temporal Data <email address hidden>
Fix schedule workflow to CAN after signals (#5799)
## What changed and why?
If a schedule was paused and received a large number of signals
(trigger, backfill, etc.), it wouldn't be able to continue-as-new and
history size could grow past the suggested limit.
For various reasons the main loop receives and processes signals across
iterations, with checking for CAN in between, so a wakeup due to a
signal (instead of a timer) would prevent CAN. Refactoring is hard due
to the determinism requirement, so the simplest fix is to do a second
check.