Schedules or updates the consumer tasks of the result partition with the given ID.
322663
void scheduleOrUpdateConsumers(ResultPartitionID partitionId) {

		final Execution execution = currentExecution;

		// Abort this request if there was a concurrent reset
		if (!partitionId.getProducerId().equals(execution.getAttemptId())) {
			return;
		}

		final IntermediateResultPartition partition = resultPartitions.get(partitionId.getPartitionId());

		if (partition == null) {
			throw new IllegalStateException("Unknown partition " + partitionId + ".");
		}

		partition.markDataProduced();

		if (partition.getIntermediateResult().getResultType().isPipelined()) {
			// Schedule or update receivers of this partition
			execution.scheduleOrUpdateConsumers(partition.getConsumers());
		}
		else {
			throw new IllegalArgumentException("ScheduleOrUpdateConsumers msg is only valid for" +
					"pipelined partitions.");
		}
	}
1005708
public void startTask(int id, String taskName) {
        if (isActivated) {
            durations.add(new Duration(id, taskName, BenchmarkUtil.elapsedRealTimeNanos()));
        }
    }
965410
def Schedule(self, tasks, mutation_pool, timestamp=None):
    """"""
    non_fleetspeak_tasks = []
    for queue, queued_tasks in iteritems(
        collection.Group(tasks, lambda x: x.queue)):
      if not queue:
        continue

      client_id = _GetClientIdFromQueue(queue)
      if fleetspeak_utils.IsFleetspeakEnabledClient(
          client_id, token=self.token):
        for task in queued_tasks:
          fleetspeak_utils.SendGrrMessageThroughFleetspeak(client_id, task)
        continue
      non_fleetspeak_tasks.extend(queued_tasks)

    timestamp = timestamp or self.frozen_timestamp
    mutation_pool.QueueScheduleTasks(non_fleetspeak_tasks, timestamp)
677175
def run(self, schedule_id, **kwargs):
        
        subscriptions = Subscription.objects.filter(
            schedule_id=schedule_id, active=True, completed=False, process_status=0
        ).values("id")
        for subscription in subscriptions.iterator():
            send_next_message.delay(str(subscription["id"]))
697868
public void addResults(final String id, final ITimeSyncedIterator iterator) {
    if (id == null) {
      throw new IllegalArgumentException("Missing ID");
    }
    if (iterator == null) {
      throw new IllegalArgumentException("Iterator cannot be null");
    }
    results.put(id, iterator);
  }
683756
@Override
	public CompletableFuture<Acknowledge> updatePartitions(
			final ExecutionAttemptID executionAttemptID,
			Iterable<PartitionInfo> partitionInfos,
			Time timeout) {
		final Task task = taskSlotTable.getTask(executionAttemptID);

		if (task != null) {
			for (final PartitionInfo partitionInfo: partitionInfos) {
				IntermediateDataSetID intermediateResultPartitionID = partitionInfo.getIntermediateDataSetID();

				final SingleInputGate singleInputGate = task.getInputGateById(intermediateResultPartitionID);

				if (singleInputGate != null) {
					// Run asynchronously because it might be blocking
					getRpcService().execute(
						() -> {
							try {
								singleInputGate.updateInputChannel(partitionInfo.getInputChannelDeploymentDescriptor());
							} catch (IOException | InterruptedException e) {
								log.error("Could not update input data location for task {}. Trying to fail task.", task.getTaskInfo().getTaskName(), e);

								try {
									task.failExternally(e);
								} catch (RuntimeException re) {
									// TODO: Check whether we need this or make exception in failExtenally checked
									log.error("Failed canceling task with execution ID {} after task update failure.", executionAttemptID, re);
								}
							}
						});
				} else {
					return FutureUtils.completedExceptionally(
						new PartitionException("No reader with ID " + intermediateResultPartitionID +
							" for task " + executionAttemptID + " was found."));
				}
			}

			return CompletableFuture.completedFuture(Acknowledge.get());
		} else {
			log.debug("Discard update for input partitions of task {}. Task is no longer running.", executionAttemptID);
			return CompletableFuture.completedFuture(Acknowledge.get());
		}
	}
1141491
private Void indexUpdate(Collection<Consumer<Void>> state, Consumer<Void> indexAction) {
        if (async) {
            state.add(indexAction);
        } else {
            indexAction.accept(null);
        }
        return null;
    }
220058
public void setID(String ID) {
        if (ID == null) {
            throw new NullPointerException();
        }
        if (isFrozen()) {
            throw new UnsupportedOperationException("Attempt to modify a frozen TimeZone instance.");
        }
        this.ID = ID;
    }
700517
public final void updateLastCheckTime(final String id, final long lastCheckTime) {
        final CriteriaBuilder builder = getSession().getCriteriaBuilder();
        final CriteriaUpdate<PrintJobStatusExtImpl> update =
                builder.createCriteriaUpdate(PrintJobStatusExtImpl.class);
        final Root<PrintJobStatusExtImpl> root = update.from(PrintJobStatusExtImpl.class);
        update.where(builder.equal(root.get("referenceId"), id));
        update.set(root.get("lastCheckTime"), lastCheckTime);
        getSession().createQuery(update).executeUpdate();
    }
16166
public void setTaskState(String id, String newState) {
        db.update(UPDATE_SQL2, newState, Integer.parseInt(id));
    }
1190820
def run_job(self, id, jobstore=None):
        
        job = self._scheduler.get_job(id, jobstore)

        if not job:
            raise JobLookupError(id)

        job.func(*job.args, **job.kwargs)
255750
public void addSession(String id, Session session) {
    synchronized (session) {
      SessionSchedulable schedulable =
        new SessionSchedulable(session, getType());
      idToSession.put(id, schedulable);
    }
  }
823203
public Date finish(String id, String resultType) {
        long now = System.currentTimeMillis();
        db.update("UPDATE TaskLogs SET resultType = ?, finishDate = ? WHERE id = ?",
                resultType, now, Integer.parseInt(id));
        return new Date(now);
    }
522799
function updateSchedule (scheduleId, name, enabled, callback) {
  if (typeof scheduleId !== 'string') {
    throw new JError.InvalidArgumentError('Schedule ID must be set to string.')
  }
  var body = {}
  if (name != null) {
    if (typeof name !== 'string') {
      throw new JError.InvalidArgumentError('name must be set to string.')
    }
    body = JUtil.extend(body, {
      'name': name
    })
  }
  if (enabled != null) {
    if (typeof enabled !== 'boolean') {
      throw new JError.InvalidArgumentError('enabled must be set to boolean.')
    }
    body = JUtil.extend(body, {
      'enabled': enabled
    })
  }
  if (!JUtil.isEmptyObject(this.trigger)) {
    body = JUtil.extend(body, {
      'trigger': this.trigger
    })
  }
  if (!JUtil.isEmptyObject(this.payload)) {
    validate(this.payload)
    this.payload.options = JUtil.extend({
      'sendno': generateSendno(),
      'apns_production': false
    },
      this.payload.options)
    body = JUtil.extend(body, {
      'push': this.payload
    })
  }
  return this.client.updateSchedule(scheduleId, JSON.stringify(body), callback)
}
1138192
public JSONObject updateTask(int id, HashMap<String, String> options) {
        AipRequest request = new AipRequest();
        preOperation(request);
        
        request.addBody("id", id);
        if (options != null) {
            request.addBody(options);
        }
        request.setUri(KnowledgeGraphicConsts.UPDATE_TASK);
        postOperation(request);
        return requestServer(request);
    }
996951
public void updateUniqueCounters()
   {
      //
      // Update task unique IDs
      //
      for (Task task : m_parent.getTasks())
      {
         int uniqueID = NumberHelper.getInt(task.getUniqueID());
         if (uniqueID > m_taskUniqueID)
         {
            m_taskUniqueID = uniqueID;
         }
      }

      //
      // Update resource unique IDs
      //
      for (Resource resource : m_parent.getResources())
      {
         int uniqueID = NumberHelper.getInt(resource.getUniqueID());
         if (uniqueID > m_resourceUniqueID)
         {
            m_resourceUniqueID = uniqueID;
         }
      }

      //
      // Update calendar unique IDs
      //
      for (ProjectCalendar calendar : m_parent.getCalendars())
      {
         int uniqueID = NumberHelper.getInt(calendar.getUniqueID());
         if (uniqueID > m_calendarUniqueID)
         {
            m_calendarUniqueID = uniqueID;
         }
      }

      //
      // Update assignment unique IDs
      //
      for (ResourceAssignment assignment : m_parent.getResourceAssignments())
      {
         int uniqueID = NumberHelper.getInt(assignment.getUniqueID());
         if (uniqueID > m_assignmentUniqueID)
         {
            m_assignmentUniqueID = uniqueID;
         }
      }
   }
629765
public void updateTask(TaskResult taskResult) {
        Preconditions.checkNotNull(taskResult, "Task result cannot be null");
        stub.updateTask(TaskServicePb.UpdateTaskRequest.newBuilder()
                .setResult(protoMapper.toProto(taskResult))
                .build()
        );
    }