Celery 3.1 Documentation
dedicated directory: $ mkdir -p /var/run/celery $ mkdir -p /var/log/celery $ celery multi start w1 -A proj -l info --pidfile=/var/run/celery/%n.pid \ --logfile=/var/log/celery/%n%I.log With the multi AsyncResult(task_id) result.get(propagate=False) # make sure result written. with open(os.path.join('/var/errors', task_id), 'a') as fh: print('--\n\n{0} {1} {2}'.format( task_id, result.result, result.traceback) celery multi: $ celery multi start 1 -A proj -l info -c4 --pidfile=/var/run/celery/%n.pid $ celery multi restart 1 --pidfile=/var/run/celery/%n.pid For production deployments you should be using init0 码力 | 607 页 | 2.27 MB | 1 年前3Celery 3.1 Documentation
$ mkdir -p /var/run/celery $ mkdir -p /var/log/celery $ celery multi start w1 -A proj -l info -- pidfile=/var/run/celery/%n.pid \ -- logfile=/var/log/celery/%n%I AsyncResult(task_id) result.get(propagate=False) # make sure result written. with open(os.path.join('/var/errors', task_id), 'a') as fh: print('--\n\n{0} {1} {2}'.format( task_id, result celery multi: $ celery multi start 1 -A proj -l info -c4 -- pidfile=/var/run/celery/%n.pid $ celery multi restart 1 --pidfile=/var/run/celery/%n.pid For production deployments you should be using init0 码力 | 887 页 | 1.22 MB | 1 年前3Celery 2.5 Documentation
directory, or alternatively you can specify a custom location for this file: $ celerybeat -s /home/celery/var/run/celerybeat-schedule Note: To daemonize celerybeat see Running celeryd as a daemon. Using custom ="celeryconfig" # %n will be replaced with the nodename. CELERYD_LOG_FILE="/var/log/celery/%n.log" CELERYD_PID_FILE="/var/run/celery/%n.pid" # Workers should run as an unprivileged user. CELERYD_USER="celery" ="celeryconfig" # %n will be replaced with the nodename. CELERYD_LOG_FILE="/var/log/celery/%n.log" CELERYD_PID_FILE="/var/run/celery/%n.pid" 5.2. Running celeryd as a daemon 115 Celery Documentation0 码力 | 400 页 | 1.40 MB | 1 年前3Celery 2.2 Documentation
directory, or alternatively you can specify a custom location for this file: $ celerybeat -s /home/celery/var/run/celerybeat-schedule Note: To daemonize celerybeat see Running celeryd as a daemon. Using custom ”celeryconfig” # %n will be replaced with the nodename. CELERYD_LOG_FILE=”/var/log/celery/%n.log” CEL- ERYD_PID_FILE=”/var/run/celery/%n.pid” # Workers should run as an unprivileged user. CELERYD_USER=”celery” ="celeryconfig" # %n will be replaced with the nodename. CELERYD_LOG_FILE="/var/log/celery/%n.log" CELERYD_PID_FILE="/var/run/celery/%n.pid" # Workers should run as an unprivileged user. CELERYD_USER="celery"0 码力 | 314 页 | 1.26 MB | 1 年前3Celery 3.0 Documentation
dedicated directory: $ mkdir -p /var/run/celery $ mkdir -p /var/log/celery $ celery multi start w1 -A proj -l info --pidfile=/var/run/celery/%n.pid \ --logfile=/var/log/celery/%n%I.log With the multi proj.celery import app @app.task def log_error(request, exc, traceback): with open(os.path.join('/var/errors', request.id), 'a') as fh: print('--\n\n{0} {1} {2}'.format( task_id, exc, traceback), file=fh) celery multi: $ celery multi start 1 -A proj -l info -c4 --pidfile=/var/run/celery/%n.pid $ celery multi restart 1 --pidfile=/var/run/celery/%n.pid For production deployments you should be using init-scripts0 码力 | 703 页 | 2.60 MB | 1 年前3Celery v4.0.1 Documentation
$ mkdir -p /var/run/celery $ mkdir -p /var/log/celery $ celery multi start w1 -A proj -l info -- pidfile=/var/run/celery/%n.pid \ -- logfile=/var/log/celery/%n%I celery import app @app.task def log_error(request, exc, traceback): with open(os.path.join('/var/errors', request.id), 'a') as fh: print('--\n\n{0} {1} {2}'.format( task_id, exc celery multi: $ celery multi start 1 -A proj -l info -c4 -- pidfile=/var/run/celery/%n.pid $ celery multi restart 1 --pidfile=/var/run/celery/%n.pid For production deployments you should be using init-scripts0 码力 | 1040 页 | 1.37 MB | 1 年前3Celery v4.0.2 Documentation
$ mkdir -p /var/run/celery $ mkdir -p /var/log/celery $ celery multi start w1 -A proj -l info -- pidfile=/var/run/celery/%n.pid \ -- logfile=/var/log/celery/%n%I celery import app @app.task def log_error(request, exc, traceback): with open(os.path.join('/var/errors', request.id), 'a') as fh: print('--\n\n{0} {1} {2}'.format( task_id, exc celery multi: $ celery multi start 1 -A proj -l info -c4 -- pidfile=/var/run/celery/%n.pid $ celery multi restart 1 --pidfile=/var/run/celery/%n.pid For production deployments you should be using init-scripts0 码力 | 1042 页 | 1.37 MB | 1 年前3Celery v4.1.0 Documentation
dedicated directory: $ mkdir -p /var/run/celery $ mkdir -p /var/log/celery $ celery multi start w1 -A proj -l info --pidfile=/var/run/celery/%n.pid \ --logfile=/var/log/celery/%n%I.log With the multi proj.celery import app @app.task def log_error(request, exc, traceback): with open(os.path.join('/var/errors', request.id), 'a') as fh: print('--\n\n{0} {1} {2}'.format( task_id, exc, traceback), file=fh) celery multi: $ celery multi start 1 -A proj -l info -c4 --pidfile=/var/run/celery/%n.pid $ celery multi restart 1 --pidfile=/var/run/celery/%n.pid For production deployments you should be using init-scripts0 码力 | 714 页 | 2.63 MB | 1 年前3Celery v4.0.1 Documentation
dedicated directory: $ mkdir -p /var/run/celery $ mkdir -p /var/log/celery $ celery multi start w1 -A proj -l info --pidfile=/var/run/celery/%n.pid \ --logfile=/var/log/celery/%n%I.log With the multi Documentation, Release 4.0.1 @app.task def log_error(request, exc, traceback): with open(os.path.join('/var/errors', request.id), 'a') as fh: print('--\n\n{0} {1} {2}'.format( task_id, exc, traceback), file=fh) celery multi: $ celery multi start 1 -A proj -l info -c4 --pidfile=/var/run/celery/%n.pid $ celery multi restart 1 --pidfile=/var/run/celery/%n.pid For production deployments you should be using init-scripts0 码力 | 705 页 | 2.63 MB | 1 年前3Celery v4.1.0 Documentation
$ mkdir -p /var/run/celery $ mkdir -p /var/log/celery $ celery multi start w1 -A proj -l info -- pidfile=/var/run/celery/%n.pid \ -- logfile=/var/log/celery/%n%I celery import app @app.task def log_error(request, exc, traceback): with open(os.path.join('/var/errors', request.id), 'a') as fh: print('--\n\n{0} {1} {2}'.format( task_id, exc celery multi: $ celery multi start 1 -A proj -l info -c4 -- pidfile=/var/run/celery/%n.pid $ celery multi restart 1 --pidfile=/var/run/celery/%n.pid For production deployments you should be using init-scripts0 码力 | 1057 页 | 1.35 MB | 1 年前3
共 51 条
- 1
- 2
- 3
- 4
- 5
- 6