> For the complete documentation index, see [llms.txt](https://docs.unitlab.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.unitlab.ai/api-sdk-cli/hi/sdks/batch-queues-and-processing.md).

# Batch Queues और प्रोसेसिंग

Python SDK में Batch Queue से अपलोड की सर्वर-साइड प्रोसेसिंग ट्रैक करें, टाइमआउट के साथ इंतज़ार करें और विफल फ़ाइलों की सूची देखें।

हर अपलोड, क्लाउड इम्पोर्ट और अटैच एक **Batch Queue** बनाता है। सर्वर इसकी फ़ाइलों को बैकग्राउंड में प्रोसेस करता है: मेटाडेटा पढ़ता है, वीडियो फ़्रेम निकालता है और बड़े रैस्टर के लिए टाइलें बनाता है।

```python
queue = project.batch_queue("BATCH_QUEUE_ID")
status = queue.wait(timeout=1800, show_progress=True)

if status.failed:
    for row in queue.data():
        print(row)
```

## मेथड <a href="#methods" id="methods"></a>

| कॉल                                                               | क्या लौटाता है                                 |
| ----------------------------------------------------------------- | ---------------------------------------------- |
| `project.batch_queues()`                                          | प्रोजेक्ट की हर Batch Queue                    |
| `project.batch_queue(id)`                                         | एक `BatchQueue`                                |
| `queue.status()`                                                  | मौजूदा `ProcessingStatus`                      |
| `queue.wait(timeout=1800, on_progress=None, show_progress=False)` | अंतिम `ProcessingStatus`                       |
| `queue.data()`                                                    | क्यू की फ़ाइलें, उनकी प्रोसेसिंग स्थिति के साथ |
| `queue.refresh()`                                                 | क्यू को दोबारा पढ़कर लौटाता है                 |

`project.upload()` से मिला `UploadBatch.wait()` यही करता है और टर्मिनल में प्रोग्रेस बार दिखाता है।

## ProcessingStatus <a href="#processingstatus" id="processingstatus"></a>

| फ़ील्ड                                       | अर्थ                                                     |
| -------------------------------------------- | -------------------------------------------------------- |
| `status`                                     | `processing`, `completed`, `partial_failure` या `failed` |
| `total`, `completed`, `processing`, `failed` | फ़ाइलों की गिनती                                         |
| `error`                                      | पूरी क्यू विफल होने पर संदेश                             |
| `frame_count`                                | LiDAR सीन के फ़्रेम, वरना `None`                         |

`wait()` तब खत्म होता है जब `processing` 0 हो जाता है। पोलिंग 1 सेकंड से शुरू होकर धीरे-धीरे 20 सेकंड तक बढ़ती है।

## प्रोग्रेस कॉलबैक <a href="#progress-callbacks" id="progress-callbacks"></a>

```python
def report(status):
    print(f"{status.completed}/{status.total} done, {status.failed} failed")

queue.wait(timeout=3600, on_progress=report)
```

## जब इंतज़ार टाइम आउट हो जाए <a href="#when-the-wait-times-out" id="when-the-wait-times-out"></a>

`ProcessingTimeoutError` का मतलब है कि प्रोसेसिंग अभी चल रही है, न कि विफल हुई है। आखिरी स्टेटस `error.status` में होता है। Batch Queue ID संभालकर रखें और बाद में फिर से इंतज़ार करें:

```python
from unitlab import ProcessingTimeoutError

try:
    queue.wait(timeout=600)
except ProcessingTimeoutError as error:
    print("Still processing:", error.status.processing)
```

## संबंधित पेज <a href="#related" id="related"></a>

[प्रोजेक्ट में डेटा अपलोड](https://docs.unitlab.ai/api-sdk-cli/hi/sdks/project-uploads.md) · [CLI: Batch Queues](https://docs.unitlab.ai/api-sdk-cli/hi/clis/cli-batch-queues.md) · [एक्सेप्शन, टाइमआउट और रिट्राई](https://docs.unitlab.ai/api-sdk-cli/hi/sdks/exceptions-timeouts-and-retries.md)
