removed the limit to the number of workers
Browse files
app.py
CHANGED
@@ -4,13 +4,13 @@ import subprocess
|
|
4 |
def run_command(command):
|
5 |
try:
|
6 |
output = subprocess.check_output(
|
7 |
-
command, shell=True, stderr=subprocess.STDOUT, universal_newlines=True
|
|
|
8 |
print(output)
|
9 |
except subprocess.CalledProcessError as e:
|
10 |
-
print(
|
11 |
-
f"Command execution failed with return code {e.returncode}: {e.output}")
|
12 |
|
13 |
|
14 |
# Example usage
|
15 |
-
command = "uvicorn App.app:app --host 0.0.0.0 --port 7860 & celery -A App.Worker.celery worker
|
16 |
run_command(command)
|
|
|
4 |
def run_command(command):
|
5 |
try:
|
6 |
output = subprocess.check_output(
|
7 |
+
command, shell=True, stderr=subprocess.STDOUT, universal_newlines=True
|
8 |
+
)
|
9 |
print(output)
|
10 |
except subprocess.CalledProcessError as e:
|
11 |
+
print(f"Command execution failed with return code {e.returncode}: {e.output}")
|
|
|
12 |
|
13 |
|
14 |
# Example usage
|
15 |
+
command = "uvicorn App.app:app --host 0.0.0.0 --port 7860 & celery -A App.Worker.celery worker --loglevel=info"
|
16 |
run_command(command)
|