Update the status indicator for the current job with a new status.

@param int The status of the job (see constants in Resque_Job_Status)
175396
public function update($status)
    {
        if (!$this->isTracking()) {
            return;
        }

        $statusPacket = [
            'status' => $status,
            'updated' => time()
        ];
        $this->resqueInstance->redis->set((string)$this, json_encode($statusPacket));

        // Expire the status for completed jobs after 24 hours
        if (in_array($status, self::$completeStatuses)) {
            $this->resqueInstance->redis->expire((string)$this, 86400);
        }
    }
202554
public function setStatus($status)
    {
        $this->redis->hset(self::redisKey($this), 'status', $status);

        $oldstatus = $this->status;
        $this->status = $status;

        switch ($status) {
            case self::STATUS_NEW:
                break;
            case self::STATUS_RUNNING:
                if ($oldstatus != self::STATUS_NEW) {
                    Event::fire(Event::WORKER_RESUME, $this);
                }

                break;
            case self::STATUS_PAUSED:
                Event::fire(Event::WORKER_PAUSE, $this);
                break;
        }
    }
767372
protected function updateStatus($newStatus)
    {
        if ($newStatus < CommandInterface::STATUS_PENDING || $newStatus > CommandInterface::STATUS_FAILED) {
            throw new \InvalidArgumentException('Command status updated to invalid value ' . $newStatus . '. $newStatus must be one of CommandInterface::STATUS_* constants',
                1457113082);
        }

        $oldStatus = $this->status;
        $this->status = $newStatus;

        foreach ($this->statusUpdateObservers as $observer) {
            $observer->update($this, $oldStatus);
        }
    }
782725
protected function updateOrderStatus()
    {
        $data = array('status' => $this->getModuleSetting('order_status_success'));
        $this->order->update($this->data_order['order_id'], $data);
        $this->data_order = $this->order->get($this->data_order['order_id']);
    }
816717
def set_status(self, status, add_section=True):
        
        status = str(status)

        if add_section:
            self.section(status)

        self.job_add_status('status', status)
619476
protected void setStatus(int status) {
	if (this.status == status) return;
	this.status = status;

	if (listeners == null) return;
	int size = listeners.size();
	for(int i=0;i<size;i++) {
	    GramJobListener listener = (GramJobListener)listeners.elementAt(i);
	    listener.statusChanged(this);
	}
    }
869071
public function setStatus( $status )
	{
		if ( $status == $this->getStatus() ) { return; }

		$this->_values['status'] = (int) $status;
		$this->setModified();
	}
1038641
protected function updateOrderStatus()
    {
        $data = array('status' => $this->getSetting('order_status_success'));
        $this->order->update($this->data_order['order_id'], $data);
        $this->data_order = $this->order->get($this->data_order['order_id']);
    }
812136
void updateCount() {
		if (this.hasChanged) {
			this.positionArray = ArrayUtils.toPrimitive(getPositionList()
					.toArray(new Long[0]));
			this.hasChanged = false;
		}
	}
1044313
private function updateStatus()
    {
        if (isset($this->inputs['status']) && trim($this->inputs['status']) !== '') {
            $this->connectToWhatsApp();
            $this->wa->sendStatusUpdate($this->inputs['status']);
            exit(json_encode([
                'success'  => true,
                'data'     => "<br />Your status was updated to - <b>{$this->inputs['status']}</b>",
                'messages' => $this->messages,
            ]));
        } else {
            exit(json_encode([
                'success'  => false,
                'errormsg' => 'There was no text in the submitted status box!',
            ]));
        }
    }
691589
public function applyStatusCondition(QueryBuilder $query, ?int $status, string $statusColumn = 'status', string $paramName = 'status'): void
    {
        $query->andWhere($query->expr()->eq($statusColumn, ':' . $paramName))
            ->setParameter($paramName, $status, Type::INTEGER);
    }
976578
public function withStatus(string $status): self
    {
        $this->status = JobEventStatusEnum::ensureValid($status);
        return $this;
    }
487600
public void update(StatusData<T> status) {
        if (status == null) {
            throw new IllegalArgumentException("Received null as status data!");
        }
        neverUpdated = false;
        handleStatsResetIfNeeded(status);
        for (T metric : metrics) {
            Object value = status.get(metric);
            if (value == null) {
                getLogger().warn("StatusData contains no value for metric '"+metric.getCaption() + "'.");
                continue;
            }
            StatValue stat = getMonitoredStatValue(metric);
            switch (metric.getType()) {
                case INT: stat.setValueAsInt(Integer.class.cast(value)); break;
                case DOUBLE: stat.setValueAsDouble(Double.class.cast(value)); break;
                case STRING: stat.setValueAsString(value.toString()); break;
                case COUNTER:
                case DIFFLONG:
                case LONG: stat.setValueAsLong(Long.class.cast(value));break;
                default: stat.setValueAsString(value.toString()); break;
            }
        }
    }
930207
public function setStatus($value)
    {
        $this->_validateNotNull('Status', $value);
        $this->_validateInt('Status', $value);

        if ($this->data['status'] === $value) {
            return;
        }

        $this->data['status'] = $value;

        $this->_setModified('status');
    }
929245
public function shiftUp(int $index) : void
    {
        if ($index + 1 === $this->count()) {
            return;
        }

        $this->swap($index, $index + 1);
    }
462087
void update(JobStatus status) {
    this.status = status;
    try {
      this.counters = running.getCounters();
      this.completed = running.isComplete();
      this.successful = running.isSuccessful();
      this.mapProgress = running.mapProgress();
      this.reduceProgress = running.reduceProgress();
      // running.getTaskCompletionEvents(fromEvent);

    } catch (IOException ioe) {
      ioe.printStackTrace();
    }

    this.completedMaps = (int) (this.totalMaps * this.mapProgress);
    this.completedReduces = (int) (this.totalReduces * this.reduceProgress);
  }
562126
synchronized void statusUpdate(TaskStatus status) {
    setProgress(status.getProgress());
    this.runState = status.getRunState();
    this.stateString = status.getStateString();
    this.nextRecordRange = status.getNextRecordRange();

    setDiagnosticInfo(status.getDiagnosticInfo());
    
    if (status.getStartTime() > 0) {
      this.startTime = status.getStartTime(); 
    }
    if (status.getFinishTime() > 0) {
      setFinishTime(status.getFinishTime()); 
    }
    
    this.phase = status.getPhase();
    this.counters = status.getCounters();
    this.outputSize = status.outputSize;
  }