Mark that we've finished processing records
512611
function finishProcessing(err) {
      if (err) return cb(err);
      db.eval(hmz, 2, 'processing_domains', 'expiring_domains',
        domain, next);
    }
1030593
def finalize(self, result):
        """"""
        sys.stderr = self._stderr.pop()
        sys.stdout = self._stdout.pop()
        pdb.set_trace = self._set_trace.pop()
        pdb.Pdb.cmdloop = self._cmdloop.pop()
350703
def _finish(self):
        """"""
        self.finished = True
        if self._callback:
            self._callback(self)
        self._finish_event.set()
998933
def finish(self, blueprint, documents):
        """"""

        # Reset the blueprint
        blueprint.reset()

        # Finish the documents
        finished = []
        for document in documents:
            finished.append(blueprint.finish(document))

        return finished
42402
def finish(status, stdout, stderr, passed, pending, failed)
      RRRSpec.redis.hmset(
        key,
        'finished_at', Time.zone.now.to_s,
        'status', status,
        'stdout', stdout,
        'stderr', stderr,
        'passed', passed,
        'pending', pending,
        'failed', failed
      )
    end
327275
private void afterRecord() {
        if (fileNamePattern != null && getRecordCounter() % splitlimit == 0) {
            try {
                endCollection();
                writer.close();
                newWriter(fileNamePattern, fileNameCounter, bufferSize, compress);
                setupEventConsumer(writer, indent);
                beginCollection();
            } catch (IOException e) {
                logger.log(Level.SEVERE, e.getMessage(), e);
            }
        }
    }
899558
def check_finished(self):
        """"""
        changed = False
        for key in list(self.processes.keys()):
            # Poll process and check if it finshed
            process = self.processes[key]
            process.poll()
            if process.returncode is not None:
                # If a process is terminated by `stop` or `kill`
                # we want to queue it again instead closing it as failed.
                if key not in self.stopping:
                    # Get std_out and err_out
                    output, error_output = process.communicate()

                    descriptor = self.descriptors[key]
                    descriptor['stdout'].seek(0)
                    descriptor['stderr'].seek(0)
                    output = get_descriptor_output(descriptor['stdout'], key, handler=self)
                    error_output = get_descriptor_output(descriptor['stderr'], key, handler=self)

                    # Mark queue entry as finished and save returncode
                    self.queue[key]['returncode'] = process.returncode
                    if process.returncode != 0:
                        self.queue[key]['status'] = 'failed'
                    else:
                        self.queue[key]['status'] = 'done'

                    # Add outputs to queue
                    self.queue[key]['stdout'] = output
                    self.queue[key]['stderr'] = error_output
                    self.queue[key]['end'] = str(datetime.now().strftime("%H:%M"))

                    self.queue.write()
                    changed = True
                else:
                    self.stopping.remove(key)
                    if key in self.to_remove:
                        self.to_remove.remove(key)
                        del self.queue[key]
                    else:
                        if key in self.to_stash:
                            self.to_stash.remove(key)
                            self.queue[key]['status'] = 'stashed'
                        else:
                            self.queue[key]['status'] = 'queued'
                        self.queue[key]['start'] = ''
                        self.queue[key]['end'] = ''

                    self.queue.write()

                self.clean_descriptor(key)
                del self.processes[key]

        # If anything should be logged we return True
        return changed
323409
def finish(self, message_id):
        """"""
        self.send(nsq.finish(message_id))
        self.finish_inflight()
        self.on_finish.send(self, message_id=message_id)
1320572
function done() {
        var arg = errors.length ? errors : null
        --pending || process.nextTick(callback, arg)
    }
1035879
def handle_finish(queue_name):
    """"""
    task_id = request.form.get('task_id', type=str)
    owner = request.form.get('owner', request.remote_addr, type=str)
    error = request.form.get('error', type=str) is not None
    try:
        work_queue.finish(queue_name, task_id, owner, error=error)
    except work_queue.Error, e:
        return utils.jsonify_error(e)

    db.session.commit()
    logging.debug('Task finished: queue=%r, task_id=%r, owner=%r, error=%r',
                  queue_name, task_id, owner, error)
    return flask.jsonify(success=True)
1115679
private void onUploadFinished() {
        if (artifactUploadState.areAllUploadsFinished() && artifactUploadState.isStatusPopupMinimized()) {
            if (artifactUploadState.getFilesInFailedState().isEmpty()) {
                cleanupStates();
                closeWindow();
            } else {
                maximizeWindow();
            }
        }
    }
256081
def finish(self):
        """"""
        self.update(self.maxval)
        if self.signal_set:
            signal.signal(signal.SIGWINCH, signal.SIG_DFL)
1243836
def finish(self):
        
        os.system('setterm -cursor on')
        if self.nl:
            Echo(self.label).done()
474209
void process_record(InputRecord r, boolean expectingFinished)
            throws IOException {

        checkThrown();

        /*
         * Store the incoming handshake data, then see if we can
         * now process any completed handshake messages
         */
        input.incomingRecord(r);

        /*
         * We don't need to create a separate delegatable task
         * for finished messages.
         */
        if ((conn != null) || expectingFinished) {
            processLoop();
        } else {
            delegateTask(new PrivilegedExceptionAction<Void>() {
                public Void run() throws Exception {
                    processLoop();
                    return null;
                }
            });
        }
    }
689477
function( err ){
            if( err ) return cb( err );

            consolelog( rnd, "completeRecord done. At this point, recordWithLookups is:", recordWithLookups );

            cb( null, recordWithLookups );
          }
100332
def finished(cls, jobid):
        """"""
        output = subprocess.check_output(
            [SACCT, '-n', '-X', '-o', "end", '-j', str(jobid)]
        )
        end = output.strip().decode()
        return end not in {'Unknown', ''}
849548
def _toc_fetch_finished(self):
        """"""
        self.cf.remove_port_callback(self.port, self._new_packet_cb)
        logger.debug('[%d]: Done!', self.port)
        self.finished_callback()