Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- work_queue.py +6 -1
work_queue.py
CHANGED
|
@@ -45,7 +45,12 @@ class QueuedTask:
|
|
| 45 |
class WorkQueueManager:
|
| 46 |
"""์์
ํ ๊ด๋ฆฌ์"""
|
| 47 |
|
| 48 |
-
def __init__(self, queue_dir: str =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
self.queue_dir = Path(queue_dir)
|
| 50 |
self.config_path = Path(config_path)
|
| 51 |
self.queue_dir.mkdir(parents=True, exist_ok=True)
|
|
|
|
| 45 |
class WorkQueueManager:
|
| 46 |
"""์์
ํ ๊ด๋ฆฌ์"""
|
| 47 |
|
| 48 |
+
def __init__(self, queue_dir: str = None, config_path: str = None):
|
| 49 |
+
import os
|
| 50 |
+
if queue_dir is None:
|
| 51 |
+
queue_dir = os.getenv("WORK_QUEUE_DIR", "/tmp/work-queue")
|
| 52 |
+
if config_path is None:
|
| 53 |
+
config_path = os.getenv("WORK_QUEUE_CONFIG", "/tmp/work-queue/config.json")
|
| 54 |
self.queue_dir = Path(queue_dir)
|
| 55 |
self.config_path = Path(config_path)
|
| 56 |
self.queue_dir.mkdir(parents=True, exist_ok=True)
|