setJobState method added to JobsService for updating jobs state