MCPcopy Create free account
hub / github.com/golang/appengine / LeaseByTag

Function LeaseByTag

taskqueue/taskqueue.go:444–446  ·  view source on GitHub ↗

LeaseByTag leases tasks from a queue, grouped by tag. If tag is empty, then the returned tasks are grouped by the tag of the task with earliest ETA. leaseTime is in seconds. The number of tasks fetched will be at most maxTasks.

(c context.Context, maxTasks int, queueName string, leaseTime int, tag string)

Source from the content-addressed store, hash-verified

442// leaseTime is in seconds.
443// The number of tasks fetched will be at most maxTasks.
444func LeaseByTag(c context.Context, maxTasks int, queueName string, leaseTime int, tag string) ([]*Task, error) {
445 return lease(c, maxTasks, queueName, leaseTime, true, []byte(tag))
446}
447
448// Purge removes all tasks from a queue.
449func Purge(c context.Context, queueName string) error {

Callers

nothing calls this directly

Calls 1

leaseFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…