// Lease only tasks tagged with "process"List<TaskHandle>tasks=q.leaseTasksByTag(3600,TimeUnit.SECONDS,numberOfTasksToLease,"process");// You can also specify a tag to lease via LeaseOptions passed to leaseTasks.
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-20。"],[[["\u003cp\u003eWorkers can lease tasks from a pull queue using the \u003ccode\u003eleaseTasks()\u003c/code\u003e method, which makes the task temporarily unavailable to other workers.\u003c/p\u003e\n"],["\u003cp\u003eTasks can be tagged, and workers can then lease tasks based on these tags using \u003ccode\u003eleaseTasksByTag()\u003c/code\u003e, allowing for filtered task processing.\u003c/p\u003e\n"],["\u003cp\u003eWorkers must delete tasks from the queue using \u003ccode\u003edeleteTask()\u003c/code\u003e after they have completed processing them; failure to do so may result in the task being picked up by another worker.\u003c/p\u003e\n"],["\u003cp\u003ePolling rates for leasing tasks should be regulated to avoid exceptions like \u003ccode\u003eTransientFailureException\u003c/code\u003e or \u003ccode\u003eApiDeadlineExceededException\u003c/code\u003e, and if the polling is too frequent, only the first 10 requests will return results.\u003c/p\u003e\n"],["\u003cp\u003eThe Cloud Console allows for the monitoring of tasks and queues, enabling users to view information about tasks and queues, as well as look for the \u003cem\u003ePull\u003c/em\u003e type within the queue.\u003c/p\u003e\n"]]],[],null,[]]