[web] avoid race condition while deleting database
Summary: In previous code it was possible to schedule ops on not initialized DB.
Test Plan:
- Add sleep after this line.
- Trigger database deletion and right after schedule some ops.
- Make sure there is no Database not initialized error.
Reviewers: tomek, michal
Reviewed By: tomek, michal
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D10306