Reference documentation and code samples for the Cloud Tasks V2 API module Google::Cloud::Tasks::V2::Queue::State.
State of the queue.
Constants
STATE_UNSPECIFIED
value: 0 Unspecified state.
RUNNING
value: 1 The queue is running. Tasks can be dispatched.
If the queue was created using Cloud Tasks and the queue has
had no activity (method calls or task dispatches) for 30 days,
the queue may take a few minutes to re-activate. Some method
calls may return [NOT_FOUND][google.rpc.Code.NOT_FOUND] and
tasks may not be dispatched for a few minutes until the queue
has been re-activated.
PAUSED
value: 2 Tasks are paused by the user. If the queue is paused then Cloud
Tasks will stop delivering tasks from it, but more tasks can
still be added to it by the user.
DISABLED
value: 3 The queue is disabled.
A queue becomes DISABLED when
queue.yaml
or
queue.xml
is uploaded which does not contain the queue. You cannot directly disable
a queue.
When a queue is disabled, tasks can still be added to a queue
but the tasks are not dispatched.
To permanently delete this queue and all of its tasks, call
DeleteQueue.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Cloud Tasks V2 API - Module Google::Cloud::Tasks::V2::Queue::State (v1.3.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.3.0 (latest)](/ruby/docs/reference/google-cloud-tasks-v2/latest/Google-Cloud-Tasks-V2-Queue-State)\n- [1.2.1](/ruby/docs/reference/google-cloud-tasks-v2/1.2.1/Google-Cloud-Tasks-V2-Queue-State)\n- [1.1.0](/ruby/docs/reference/google-cloud-tasks-v2/1.1.0/Google-Cloud-Tasks-V2-Queue-State)\n- [1.0.1](/ruby/docs/reference/google-cloud-tasks-v2/1.0.1/Google-Cloud-Tasks-V2-Queue-State)\n- [0.11.0](/ruby/docs/reference/google-cloud-tasks-v2/0.11.0/Google-Cloud-Tasks-V2-Queue-State)\n- [0.10.2](/ruby/docs/reference/google-cloud-tasks-v2/0.10.2/Google-Cloud-Tasks-V2-Queue-State)\n- [0.9.0](/ruby/docs/reference/google-cloud-tasks-v2/0.9.0/Google-Cloud-Tasks-V2-Queue-State)\n- [0.8.2](/ruby/docs/reference/google-cloud-tasks-v2/0.8.2/Google-Cloud-Tasks-V2-Queue-State)\n- [0.7.0](/ruby/docs/reference/google-cloud-tasks-v2/0.7.0/Google-Cloud-Tasks-V2-Queue-State)\n- [0.6.0](/ruby/docs/reference/google-cloud-tasks-v2/0.6.0/Google-Cloud-Tasks-V2-Queue-State)\n- [0.5.0](/ruby/docs/reference/google-cloud-tasks-v2/0.5.0/Google-Cloud-Tasks-V2-Queue-State)\n- [0.4.6](/ruby/docs/reference/google-cloud-tasks-v2/0.4.6/Google-Cloud-Tasks-V2-Queue-State) \nReference documentation and code samples for the Cloud Tasks V2 API module Google::Cloud::Tasks::V2::Queue::State.\n\nState of the queue.\n\nConstants\n---------\n\n### STATE_UNSPECIFIED\n\n**value:** 0 \nUnspecified state.\n\n### RUNNING\n\n**value:** 1 \nThe queue is running. Tasks can be dispatched.\n\n\n\u003cbr /\u003e\n\nIf the queue was created using Cloud Tasks and the queue has\nhad no activity (method calls or task dispatches) for 30 days,\nthe queue may take a few minutes to re-activate. Some method\ncalls may return \\[NOT_FOUND\\]\\[google.rpc.Code.NOT_FOUND\\] and\ntasks may not be dispatched for a few minutes until the queue\nhas been re-activated.\n\n### PAUSED\n\n**value:** 2 \nTasks are paused by the user. If the queue is paused then Cloud\nTasks will stop delivering tasks from it, but more tasks can\nstill be added to it by the user.\n\n### DISABLED\n\n**value:** 3 \nThe queue is disabled.\n\n\nA queue becomes `DISABLED` when\n[queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref)\nor\n[queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref)\nis uploaded which does not contain the queue. You cannot directly disable\na queue.\n\nWhen a queue is disabled, tasks can still be added to a queue\nbut the tasks are not dispatched.\n\n\u003cbr /\u003e\n\nTo permanently delete this queue and all of its tasks, call\n[DeleteQueue](/ruby/docs/reference/google-cloud-tasks-v2/latest/Google-Cloud-Tasks-V2-CloudTasks-Client#Google__Cloud__Tasks__V2__CloudTasks__Client_delete_queue_instance_ \"Google::Cloud::Tasks::V2::CloudTasks::Client#delete_queue (method)\")."]]