Update the foreman process status.
765042
def _UpdateForemanProcessStatus(self):
    """"""
    used_memory = self._process_information.GetUsedMemory() or 0

    display_name = getattr(self._merge_task, 'identifier', '')

    self._processing_status.UpdateForemanStatus(
        self._name, self._status, self._pid, used_memory, display_name,
        self._number_of_consumed_sources, self._number_of_produced_sources,
        self._number_of_consumed_events, self._number_of_produced_events,
        self._number_of_consumed_event_tags,
        self._number_of_produced_event_tags,
        self._number_of_consumed_warnings, self._number_of_produced_warnings,
        self._number_of_consumed_reports, self._number_of_produced_reports)

    self._processing_status.UpdateEventsStatus(self._events_status)
174516
def process_status(ctx, param, value):
    """"""
    from .models import PIDStatus

    # Allow empty status
    if value is None:
        return None

    if not hasattr(PIDStatus, value):
        raise click.BadParameter('Status needs to be one of {0}.'.format(
            ', '.join([s.name for s in PIDStatus])
        ))
    return getattr(PIDStatus, value)
1229505
def update_wrapper(self, process_list):
        """"""
        # Set the number of running process
        self.set_count(len(process_list))
        # Call the children update method
        if self.should_update():
            return self.update(process_list)
        else:
            return self.result()
212089
async def update(self):
        """"""
        status_data = await self._request('/status.json?show_avail=1')

        if status_data:
            self.status_data = status_data

            sensor_data = await self._request('/sensors.json')
            if sensor_data:
                self.sensor_data = sensor_data
404983
def update(self, redraw=True):
        """"""
        # get the main urwid.Frame widget
        mainframe = self.root_widget.original_widget

        # body
        if self.current_buffer:
            mainframe.set_body(self.current_buffer)

        # footer
        lines = []
        if self._notificationbar:  # .get_text()[0] != ' ':
            lines.append(self._notificationbar)
        if self._show_statusbar:
            lines.append(self.build_statusbar())

        if lines:
            mainframe.set_footer(urwid.Pile(lines))
        else:
            mainframe.set_footer(None)
        # force a screen redraw
        if self.mainloop.screen.started and redraw:
            self.mainloop.draw_screen()
210688
def update_status(self, status):
        
        assert (status in (HightonConstants.WON, HightonConstants.PENDING, HightonConstants.LOST))
        from highton.models import Status

        status_obj = Status(name=status)
        return self._put_request(
            data=status_obj.element_to_string(status_obj.encode()),
            endpoint=self.ENDPOINT + '/' + str(self.id) + '/status',
        )
898488
def update(self, update_finished_cb):
        """"""
        if not self._update_finished_cb:
            self._update_finished_cb = update_finished_cb
            self.valid = False
            logger.debug('Updating content of memory {}'.format(self.id))
            # Start reading the header
            self.mem_handler.read(self, 0, 11)
651430
def update_status(self):
        
        task = self.make_request(
            TaskRunFailed,
            href=self.href)

        return Task(task)
782078
private void update(Peer peer) {
		String id = peer.getId();
		Peer previous = peers.get(id);
		switch(previous.getStatus()) {
			case ACTIVE:
				timeouts.get(id).cancel(true);
				timeouts.put(id, executor.schedule(new Deactivate(id), delay, MILLISECONDS));
				break;
			case INACTIVE:
				peers.put(peer.getId(), peer);
				timeouts.get(id).cancel(true);
				timeouts.put(id, executor.schedule(new Deactivate(id), delay, MILLISECONDS));
				notifyActive(peer);
				break;
			default:
				String error = "Unexpected peer status: " + previous.getStatus();
				throw new RuntimeException(error);
		}
	}
1089288
def update_status sig=0
      pid_int = Integer("#{ @pid }")
      begin
        Process::kill sig, pid_int
        true
      rescue Errno::ESRCH
        false
      end
    end
385522
def update_status(self, *pargs, **kwargs):
        
        try:
            return super(API, self).update_status(*pargs, **kwargs)

        except tweepy.TweepError as e:
            if getattr(e, 'api_code', None) == 503:
                sleep(10)
                return super(API, self).update_status(*pargs, **kwargs)
            else:
                raise e
278329
def mark_for_update(self):
        '''
            
        '''
        self.pub_statuses.exclude(status=UNPUBLISHED).update(status=NEEDS_UPDATE)
        push_key.delay(self)
700346
def update(self, automation):
        """"""
        self._automation.update(
            {k: automation[k] for k in automation if self._automation.get(k)})
1326758
def update(self):
        
        configs, meta_changes = self.config_manager.determine_config_changes()
        self._process_config_changes(configs, meta_changes)
        self.supervisorctl('update')
882041
private void updateTaskStatuses(TaskTrackerStatus status) {
    TaskTrackerInfo trackerInfo = TaskTrackerInfo.fromStatus(status);
    String trackerName = status.getTrackerName();
    for (TaskStatus report : status.getTaskReports()) {
      // Ensure that every report has information about task tracker
      report.setTaskTracker(trackerName);
      LOG.debug("Task status report: " + report);
      updateTaskStatus(trackerInfo, report);
      // Take any actions outside updateTaskStatus()
      setupReduceRequests(job);
      processFetchFailures(report);
    }
  }
753393
def stop
      if @pid
        begin
          debug "Asking Foreman to terminate... (#{@pid})"
          ::Process.kill("TERM", @pid)
          debug "Waiting for Foreman to stop..."
          ::Process.waitpid(@pid)
          @pid = nil          # Unset @pid
        rescue Errno::ESRCH
          # Don't do anything, the process does not exist
          debug "Could not find Foreman process"
        end
        info "Foreman stopped."
      end
    end
554729
def update(self):
        """"""
        # Init new stats
        stats = self.get_init_value()

        # Grab per-CPU stats using psutil's cpu_percent(percpu=True) and
        # cpu_times_percent(percpu=True) methods
        if self.input_method == 'local':
            stats = cpu_percent.get(percpu=True)
        else:
            # Update stats using SNMP
            pass

        # Update the stats
        self.stats = stats

        return self.stats