Submit an event when completeness verification is successful
166277
private void submitVerificationSuccessSlaEvent(Results.Result result) {
    try {
      CompactionSlaEventHelper.getEventSubmitterBuilder(result.dataset(), Optional.<Job> absent(), this.fs)
      .eventSubmitter(this.eventSubmitter).eventName(CompactionSlaEventHelper.COMPLETION_VERIFICATION_SUCCESS_EVENT_NAME)
      .additionalMetadata(Maps.transformValues(result.verificationContext(), Functions.toStringFunction())).build()
      .submit();
    } catch (Throwable t) {
      LOG.warn("Failed to submit verification success event:" + t, t);
    }
  }
1179630
def submit_btn(self, value, success=None):
        """"""
        self.press("css=input[value='{}']".format(value))
        if success is not None:
            assert self.is_available(*success)
913782
void completedStatus(String buildResult, String message) {
        completedStatus.add(new GhprbBuildResultMessage(
                GHCommitState.valueOf(buildResult),
                message
        ));
    }
34862
def notify_complete(self, result_code, error_info):
        
        if not isinstance(result_code, baseinteger):
            raise TypeError("result_code can only be an instance of type baseinteger")
        if not isinstance(error_info, IVirtualBoxErrorInfo):
            raise TypeError("error_info can only be an instance of type IVirtualBoxErrorInfo")
        self._call("notifyComplete",
                     in_p=[result_code, error_info])
1090642
def is_done(self, submissionid_or_submission, user_check=True):
        
        # TODO: not a very nice way to avoid too many database call. Should be refactored.
        if isinstance(submissionid_or_submission, dict):
            submission = submissionid_or_submission
        else:
            submission = self.get_submission(submissionid_or_submission, False)
        if user_check and not self.user_is_submission_owner(submission):
            return None
        return submission["status"] == "done" or submission["status"] == "error"
1310960
function onReadystatechange(e) {

	if (!(e instanceof Event)) {
		throw new TypeError('Invalid event was given');
	}

	if (document.readyState == 'interactive') {
		makeReady.call(this);
	}

	if (document.readyState == 'complete') {
		makeLoaded.call(this);
	}
}
861458
def submit_if_ready(args, submit_args, config):
    """"""
    __, ext = os.path.splitext(args.input_file)
    if ext.lower() != ".xml":
        return None

    with io.open(args.input_file, encoding="utf-8") as input_file:
        xml = input_file.read(1024)

    if not ("<testsuites" in xml or "<testcases" in xml or "<requirements" in xml):
        return None

    if args.no_submit:
        logger.info("Nothing to do")
        return 0

    # expect importer xml and just submit it
    response = dump2polarion.submit_and_verify(
        xml_file=args.input_file, config=config, **submit_args
    )
    return 0 if response else 2
1348690
public void complete( T result, Object error ) {
        synchronized (this) {
            if ( isComplete ) {
                throw new RuntimeException("Promise can be completed only once");
            }
            this.result = result;
            this.error = error;
            isComplete = true;
            tryFire();
        }
    }
1206144
def editingFinishedEvent(self):
        """"""
        #print "Edit finished."
        if asUnicode(self.lineEdit().text()) == self.lastText:
            #print "no text change."
            return
        try:
            val = self.interpret()
        except:
            return
        
        if val is False:
            #print "value invalid:", str(self.lineEdit().text())
            return
        if val == self.val:
            #print "no value change:", val, self.val
            return
        self.setValue(val, delaySignal=False)
543658
def on_post(self, req, resp, **kwargs):
        """"""
        validated = self.require_validated(req)

        return super().on_post(
            req, resp,
            handler=partial(self._create, validated=validated),
            **kwargs
        )
833478
synchronized void processFinished() {
        final InternalState required = this.requiredState;
        final InternalState state = this.internalState;
        // If the server was not stopped
        if(required == InternalState.STOPPED && state == InternalState.PROCESS_STOPPING) {
            finishTransition(InternalState.PROCESS_STOPPING, InternalState.PROCESS_STOPPED);
        } else {
            this.requiredState = InternalState.STOPPED;
            if ( !(internalSetState(getTransitionTask(InternalState.PROCESS_STOPPING), internalState, InternalState.PROCESS_STOPPING)
                    && internalSetState(getTransitionTask(InternalState.PROCESS_REMOVING), internalState, InternalState.PROCESS_REMOVING)
                    && internalSetState(getTransitionTask(InternalState.STOPPED), internalState, InternalState.STOPPED)) ){
                this.requiredState = InternalState.FAILED;
                internalSetState(null, internalState, InternalState.PROCESS_STOPPED);
            }
        }
    }
303161
private synchronized void handleEvent(final StatusCompleteEvent event)
    {

        for (final Peer peer : this.peerList)
        {
            peer.endSweep();
        }
        PeerMonitor.logger.debug("Channel Mark and Sweep complete"); //$NON-NLS-1$
    }
564214
def _insert_post_complete_tasks(context):
    """"""

    logging.debug("Context %s is complete.", context.id)

    # Async event handlers
    context.exec_event_handler('complete', transactional=True)

    # Insert cleanup tasks
    try:
        # TODO: If tracking results we may not want to auto cleanup and instead
        # wait until the results have been accessed.
        from furious.async import Async
        Async(_cleanup_markers, queue=CLEAN_QUEUE,
              args=[context.id, context.task_ids],
              task_args={'countdown': CLEAN_DELAY}).start()
    except:
        pass
426306
def submit(self, fn, *args, **kwargs):
        """"""
        if not self.asynchronous:
            return fn(*args, **kwargs)
        raise NotImplementedError
635839
def _on_completion(self):
        

        logger.debug('Job {0} running _on_completion check'.format(self.name))
        if self.state.status != 'running' or (not self._is_complete()):
            return

        for job, results in self.run_log['tasks'].iteritems():
            if results.get('success', False) == False:
                self._set_status('failed')
                try:
                    self.backend.acquire_lock()
                    if self.event_handler:
                        self.event_handler.emit('job_failed',
                                                self._serialize(include_run_logs=True))
                except:
                    logger.exception("Error in handling events.")
                finally:
                    self.backend.release_lock()
                break

        if self.state.status != 'failed':
            self._set_status('waiting')
            self.run_log = {}
            try:
                self.backend.acquire_lock()
                if self.event_handler:
                    self.event_handler.emit('job_complete',
                                            self._serialize(include_run_logs=True))
            except:
                logger.exception("Error in handling events.")
            finally:
                self.backend.release_lock()

        self.destroy_snapshot()
10091
def post_event(self, client, check):
        
        self._request('POST', '/resolve',
                      data=json.dumps({'client': client, 'check': check}))
        return True
1111693
function(error, params) {
      if (error) {
        if (!options.silenceErrors) {
          logger.error('_sync.onComplete', t.className, error);
        }
        options.error(null, error);
      } else {
        logger.info('_sync.onComplete', t.className, model.get('id'));
        options.success(params);
      }
    }