[execution][database] Handle the case when wait is called and process was not

4 jobs for 30_fix_wait_method in 2 minutes and 58 seconds (queued for 3 seconds)
Status Name Job ID Coverage
  Build
passed build_linux_36 #186653
docker

00:02:53

73.0%
passed build_linux_37 #186654
docker

00:02:54

73.0%
passed build_macosx_36 #186651
macosx

00:02:53

73.0%
passed build_macosx_37 #186652
macosx

00:02:50

73.0%