File size: 1,135 Bytes
25f22bf
 
 
 
 
 
 
 
 
 
 
 
 
1d6d1e6
25f22bf
 
 
 
 
 
1d6d1e6
25f22bf
 
 
 
 
 
 
 
 
 
 
1d6d1e6
 
 
25f22bf
1d6d1e6
25f22bf
 
 
1d6d1e6
25f22bf
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
@echo off
REM Script to start Celery components on Windows

REM Check if we're in the right directory
if not exist "app.py" (
    echo Please run this script from the backend directory
    pause
    exit /b 1
)

REM Function to start Celery worker
:start_worker
echo Starting Celery worker...
start "Celery Worker" cmd /k "python start_celery.py worker"
echo Celery worker started
goto :eof

REM Function to start Celery Beat scheduler
:start_beat
echo Starting Celery Beat scheduler...
start "Celery Beat" cmd /k "python start_celery.py beat"
echo Celery Beat scheduler started
goto :eof

REM Main script logic
if "%1"=="worker" (
    call :start_worker
) else if "%1"=="beat" (
    call :start_beat
) else if "%1"=="all" (
    call :start_worker
    call :start_beat
) else if "%1"=="check" (
    echo Checking system requirements...
    python start_celery.py check
) else (
    echo Usage: %0 {worker^|beat^|all^|check}
    echo   worker - Start Celery worker
    echo   beat   - Start Celery Beat scheduler
    echo   all    - Start both worker and scheduler
    echo   check  - Check system requirements
    pause
    exit /b 1
)