added additional logic to resque rake task