The taskGroupId and schedulerId properties


Each task is assigned to a task group by its taskGroupId, a random string specified at task creation. Task groups associate "related" tasks, such as those created in response to the same version-control push. In most cases, all of the tasks in a task group are linked by dependency relations, so it is common to refer to a task group as a "task graph". The Queue service provides an API method to list all tasks with a specific taskGroupId, and task manipulation can be limited by taskGroupId.

Tasks also have a schedulerId. All tasks in a task group must have the same schedulerId. This is used for several purposes:

  • it can represent the entity that created the task;

  • it can limit addition of new tasks to a task group: the caller of createTask must have a scope related to the schedulerId of the task group (more about scopes later); and

  • it controls who can manipulate tasks, again by requiring schedulerId-related scopes.