[PATCH 1/2] avoid db error when taskSetWait called with empty task list