def job_set_done(self, js):
if self._closed:<EOL><INDENT>return<EOL><DEDENT>if self._active_js != js:<EOL><INDENT>return<EOL><DEDENT>try:<EOL><INDENT>while self._active_js.is_done():<EOL><INDENT>logger.debug("<STR_LIT>")<EOL>self._active_js = self._js_queue.popleft()<EOL>logger.debug("<STR_LIT>")<EOL><DEDENT><DEDENT>except IndexError:<EOL><INDENT>self._active_js = None<EOL><DEDENT>else:<EOL><INDENT>self._distribute_jobs()<EOL><DEDENT>
Called when a job set has been completed or cancelled. If the job set
was active, the next incomplete job set is loaded from the job set
queue and is activated.