def notify_duration_exceeded(self, participants, reference_time):
unsubmitted = []<EOL>for participant in participants:<EOL><INDENT>summary = ParticipationTime(participant, reference_time, self.config)<EOL>status = self._mturk_status_for(participant)<EOL>if status == "<STR_LIT>":<EOL><INDENT>participant.status = "<STR_LIT>"<EOL>session.commit()<EOL><DEDENT>elif status == "<STR_LIT>":<EOL><INDENT>participant.status = "<STR_LIT>"<EOL>session.commit()<EOL><DEDENT>elif status == "<STR_LIT>":<EOL><INDENT>self._resend_submitted_rest_notification_for(participant)<EOL>self._message_researcher(self._resubmitted_msg(summary))<EOL>logger.warning(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>".format(participant.id)<EOL>)<EOL><DEDENT>else:<EOL><INDENT>self._send_notification_missing_rest_notification_for(participant)<EOL>unsubmitted.append(summary)<EOL><DEDENT><DEDENT>if unsubmitted:<EOL><INDENT>self._disable_autorecruit()<EOL>self.close_recruitment()<EOL>pick_one = unsubmitted[<NUM_LIT:0>]<EOL>self._message_researcher(self._cancelled_msg(pick_one))<EOL>try:<EOL><INDENT>self.mturkservice.expire_hit(pick_one.participant.hit_id)<EOL><DEDENT>except MTurkServiceException as ex:<EOL><INDENT>logger.exception(ex)<EOL><DEDENT><DEDENT>
The participant has exceed the maximum time for the activity,
        defined in the "duration" config value. We need find out the assignment
        status on MTurk and act based on this.