[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 Job ID Name Coverage
  Build
passed #186653
docker
build_linux_36

00:02:53

73.0%
passed #186654
docker
build_linux_37

00:02:54

73.0%
passed #186651
macosx
build_macosx_36

00:02:53

73.0%
passed #186652
macosx
build_macosx_37

00:02:50

73.0%