Spaces:
Running
Running
Download src/status.js from Tataaicoltd/api: direct link, hf CLI and curl.
- Browser
- Download file 333 Bytes
-
https://huggingface.co/spaces/Tataaicoltd/api/resolve/main/src/status.js
- Command line
-
hf download hf://spaces/Tataaicoltd/api/src/status.js
-
curl -L -o status.js https://huggingface.co/spaces/Tataaicoltd/api/resolve/main/src/status.js
333 Bytes
| // Shared ticket status mapping. DB stores status as an int; APIs use labels. | |
| // Index in STATUSES = the stored integer value. | |
| export const STATUSES = ['open', 'queued', 'processing', 'done', 'failed', 'close']; | |
| export const statusToInt = (label) => STATUSES.indexOf(label); | |
| export const intToStatus = (n) => STATUSES[n] ?? 'open'; | |