[TO_STAGE] fix staleness issue with apps in clear-pending-ops script

[merge]