Marks all instances filled with this guide with the status INSTANCE_STATUS_NEEDUPDATE
496880
public function mark_for_regrade() {
        global $DB;
        if ($this->has_active_instances()) {
            $conditions = array('definitionid'  => $this->definition->id,
                        'status'  => gradingform_instance::INSTANCE_STATUS_ACTIVE);
            $DB->set_field('grading_instances', 'status', gradingform_instance::INSTANCE_STATUS_NEEDUPDATE, $conditions);
        }
    }
452046
private function updateStatus()
    {
        $status = $this->deliveryExecution->getState()->getUri();
        $this->addValue(DeliveryMonitoringService::STATUS, $status, true);
        if ($status == ProctoredDeliveryExecution::STATE_PAUSED) {
            $this->addValue(DeliveryMonitoringService::LAST_PAUSE_TIMESTAMP, microtime(true), true);
        }
    }
636988
def refresh(self, fields=None, **kwargs):
        
        cond = self.c[self._primary_field]==self._key
        query = self.filter(cond, **kwargs)
        if not fields:
            fields = list(self.table.c)
        
        v = query.values_one(*fields)
        if not v:
            raise NotFound('Instance <{0}:{1}> can not be found'.format(self.tablename, self._key))
        
        d = self._data_prepare(v.items())
        self.update(**d)
        self.set_saved()
300970
def update_finished(self):
        
        if self.is_updateable:
            javabridge.call(self.jobject, "updateFinished", "()V")
        else:
            logger.critical(classes.get_classname(self.jobject) + " is not updateable!")
1099627
public static void evalStatus(final Collection<Instance> _instances)
        throws EFapsException
    {
        Evaluation.LOG.debug("Evaluating Status for {}", _instances);
        if (CollectionUtils.isNotEmpty(_instances)) {
            final Cache<String, Long> cache = AccessCache.getStatusCache();
            final List<Instance> instances = _instances.stream().filter(inst -> !cache.containsKey(inst.getKey()))
                            .collect(Collectors.toList());
            if (!instances.isEmpty()) {
                final Attribute attr = instances.get(0).getType().getStatusAttribute();
                final MultiPrintQuery multi = new MultiPrintQuery(instances);
                multi.addAttribute(attr);
                multi.executeWithoutAccessCheck();
                while (multi.next()) {
                    final Long statusId = multi.getAttribute(attr);
                    cache.put(multi.getCurrentInstance().getKey(), statusId == null ? 0 : statusId);
                }
            }
        }
    }
466406
public function update_status($instance, $newstatus) {
        global $CFG;

        parent::update_status($instance, $newstatus);

        require_once("$CFG->dirroot/enrol/cohort/locallib.php");
        $trace = new null_progress_trace();
        enrol_cohort_sync($trace, $instance->courseid);
        $trace->finished();
    }
1324773
def _on_completions_refreshed(self, new_completer):
        
        with self._completer_lock:
            self.completer = new_completer
            # When cli is first launched we call refresh_completions before
            # instantiating the cli object. So it is necessary to check if cli
            # exists before trying the replace the completer object in cli.
            if self.cli:
                self.cli.current_buffer.completer = new_completer

        if self.cli:
            # After refreshing, redraw the CLI to clear the statusbar
            # "Refreshing completions..." indicator
            self.cli.request_redraw()
764771
def mark
      classes = Set.new
      marked_objects = 0
      @progressmeter.start("Marking linked objects", @db.item_counter) do
        each do |obj|
          classes.add(obj.class)
          @progressmeter.update(marked_objects += 1)
        end
      end
      @class_map.keep(classes.map { |c| c.to_s })

      # The root_objects object is included in the count, but we only want to
      # count user objects here.
      PEROBS.log.debug "#{marked_objects - 1} of #{@db.item_counter} " +
        "objects marked"
      @stats.marked_objects = marked_objects - 1
    end
360100
def set_status(self, status):
        
        self.status = status
        for callback in self._update_status_callbacks:
            callback(self)
1132123
public function markAsUpdated()
    {
        $this->row->markAsUpdated();
        foreach ($this->getCurrentReflection()->getEntityProperties() as $property) {
            if ($property->hasRelationship() and ($property->getRelationship() instanceof Relationship\HasMany)) {
                $relationship = $property->getRelationship();
                $this->row->cleanReferencingAddedAndRemovedMeta(
                    $relationship->getRelationshipTable(),
                    $relationship->getColumnReferencingSourceTable(),
                    null,
                    $relationship->getStrategy()
                );
            }
        }
    }
431681
def status(self, **kwargs):
        
        self.services = dict(
            init_system=self.init_system,
            services=[]
        )
1219621
private void update() {
                if (!uptodate) {
                        summary.clear();
                        distinctTraces.clear();
                        traces.clear();
                        addTraces(allTraces, false);
                        uptodate = true;
                }
        }
302584
def wait_for_status_netdev()
      @hosts.each do |host|
        if host['platform'] =~ /f5-|netscaler/
          wait_for_status(:running, @hosts)

          wait_for_status(nil, @hosts) do |instance|
            instance_status_collection = client.describe_instance_status({:instance_ids => [instance.instance_id]})
            first_instance = instance_status_collection.first[:instance_statuses].first
            first_instance[:instance_status][:status] == "ok" if first_instance
          end

          break
        end
      end
    end
995213
void restoreAllInstances() {

		// instancesMngr() instead of this.instancesMngr (for unit tests).
		this.logger.fine( "Restoring all the instance states from the current target handlers." );
		for( ManagedApplication ma : this.applicationMngr.getManagedApplications()) {

			// Build a new snapshot on every loop
			List<TargetHandler> snapshot = this.defaultTargetHandlerResolver.getTargetHandlersSnapshot();
			for( TargetHandler targetHandler : snapshot )
				instancesMngr().restoreInstanceStates( ma, targetHandler );
		}
	}
276509
def _mark_context_complete(marker, context, has_errors):
    """"""

    current = None

    if marker:
        current = marker.key.get()

    if not current:
        return False

    if current and current.complete:
        return False

    current.complete = True
    current.has_errors = has_errors
    current.put()

    # Kick off completion tasks.
    _insert_post_complete_tasks(context)

    return True
290089
def refresh(self):
        """"""
        self.trace(list(self._fnames.keys()), _refresh=True)
547676
def notify_batches_finished(self, statuses):
        
        with self._wait_condition:
            self._statuses = statuses
            self._wait_condition.notify()