Modernize reverting of errors. If pstampRequest.state = 'new' previous try at parsing was incomplete so delete any existing jobs Only revert requests if the state is not 'stop'. Only revert jobs if request and job state is 'run'