This file is indexed.

/usr/share/doc/python-celery-doc/html/configuration.html is in python-celery-doc 2.4.6-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   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
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Configuration and defaults &mdash; Celery v2.4.6 documentation</title>
    <link rel="stylesheet" href="_static/celery.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <link rel="stylesheet" href="_static/issuetracker.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '',
        VERSION:     '2.4.6',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="top" title="Celery v2.4.6 documentation" href="index.html" />
    <link rel="next" title="Cookbook" href="cookbook/index.html" />
    <link rel="prev" title="Signals" href="userguide/signals.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="cookbook/index.html" title="Cookbook"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="userguide/signals.html" title="Signals"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">Celery v2.4.6 documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
<div class="deck">

    
        <p>
        This document describes Celery 2.4. For development docs,
        <a href="http://ask.github.com/celery/configuration.html">go here</a>.
        </p>
    

</div>
    <div class="section" id="configuration-and-defaults">
<span id="configuration"></span><h1>Configuration and defaults<a class="headerlink" href="#configuration-and-defaults" title="Permalink to this headline"></a></h1>
<p>This document describes the configuration options available.</p>
<p>If you&#8217;re using the default loader, you must create the <tt class="file docutils literal"><span class="pre">celeryconfig.py</span></tt>
module and make sure it is available on the Python path.</p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#example-configuration-file" id="id5">Example configuration file</a></li>
<li><a class="reference internal" href="#configuration-directives" id="id6">Configuration Directives</a><ul>
<li><a class="reference internal" href="#concurrency-settings" id="id7">Concurrency settings</a></li>
<li><a class="reference internal" href="#task-result-backend-settings" id="id8">Task result backend settings</a></li>
<li><a class="reference internal" href="#database-backend-settings" id="id9">Database backend settings</a></li>
<li><a class="reference internal" href="#amqp-backend-settings" id="id10">AMQP backend settings</a></li>
<li><a class="reference internal" href="#cache-backend-settings" id="id11">Cache backend settings</a></li>
<li><a class="reference internal" href="#tokyo-tyrant-backend-settings" id="id12">Tokyo Tyrant backend settings</a></li>
<li><a class="reference internal" href="#redis-backend-settings" id="id13">Redis backend settings</a></li>
<li><a class="reference internal" href="#mongodb-backend-settings" id="id14">MongoDB backend settings</a></li>
<li><a class="reference internal" href="#message-routing" id="id15">Message Routing</a></li>
<li><a class="reference internal" href="#broker-settings" id="id16">Broker Settings</a></li>
<li><a class="reference internal" href="#task-execution-settings" id="id17">Task execution settings</a></li>
<li><a class="reference internal" href="#worker-celeryd" id="id18">Worker: celeryd</a></li>
<li><a class="reference internal" href="#error-e-mails" id="id19">Error E-Mails</a></li>
<li><a class="reference internal" href="#events" id="id20">Events</a></li>
<li><a class="reference internal" href="#broadcast-commands" id="id21">Broadcast Commands</a></li>
<li><a class="reference internal" href="#logging" id="id22">Logging</a></li>
<li><a class="reference internal" href="#custom-component-classes-advanced" id="id23">Custom Component Classes (advanced)</a></li>
<li><a class="reference internal" href="#periodic-task-server-celerybeat" id="id24">Periodic Task Server: celerybeat</a></li>
<li><a class="reference internal" href="#monitor-server-celerymon" id="id25">Monitor Server: celerymon</a></li>
<li><a class="reference internal" href="#deprecated-settings" id="id26">Deprecated Settings</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="example-configuration-file">
<span id="conf-example"></span><h2><a class="toc-backref" href="#id5">Example configuration file</a><a class="headerlink" href="#example-configuration-file" title="Permalink to this headline"></a></h2>
<p>This is an example configuration file to get you started.
It should contain all you need to run a basic Celery set-up.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="c"># List of modules to import when celery starts.</span>
<span class="n">CELERY_IMPORTS</span> <span class="o">=</span> <span class="p">(</span><span class="s">&quot;myapp.tasks&quot;</span><span class="p">,</span> <span class="p">)</span>

<span class="c">## Result store settings.</span>
<span class="n">CELERY_RESULT_BACKEND</span> <span class="o">=</span> <span class="s">&quot;database&quot;</span>
<span class="n">CELERY_RESULT_DBURI</span> <span class="o">=</span> <span class="s">&quot;sqlite:///mydatabase.db&quot;</span>

<span class="c">## Broker settings.</span>
<span class="n">BROKER_URL</span> <span class="o">=</span> <span class="s">&quot;amqp://guest:guest@localhost:5672//&quot;</span>

<span class="c">## Worker settings</span>
<span class="c">## If you&#39;re doing mostly I/O you can have more processes,</span>
<span class="c">## but if mostly spending CPU, try to keep it close to the</span>
<span class="c">## number of CPUs on your machine. If not set, the number of CPUs/cores</span>
<span class="c">## available will be used.</span>
<span class="n">CELERYD_CONCURRENCY</span> <span class="o">=</span> <span class="mi">10</span>
</pre></div>
</div>
</div>
<div class="section" id="configuration-directives">
<h2><a class="toc-backref" href="#id6">Configuration Directives</a><a class="headerlink" href="#configuration-directives" title="Permalink to this headline"></a></h2>
<div class="section" id="concurrency-settings">
<span id="conf-concurrency"></span><h3><a class="toc-backref" href="#id7">Concurrency settings</a><a class="headerlink" href="#concurrency-settings" title="Permalink to this headline"></a></h3>
<div class="section" id="celeryd-concurrency">
<span id="std:setting-CELERYD_CONCURRENCY"></span><h4>CELERYD_CONCURRENCY<a class="headerlink" href="#celeryd-concurrency" title="Permalink to this headline"></a></h4>
<p>The number of concurrent worker processes/threads/green threads, executing
tasks.</p>
<p>Defaults to the number of available CPUs.</p>
</div>
<div class="section" id="celeryd-prefetch-multiplier">
<span id="std:setting-CELERYD_PREFETCH_MULTIPLIER"></span><h4>CELERYD_PREFETCH_MULTIPLIER<a class="headerlink" href="#celeryd-prefetch-multiplier" title="Permalink to this headline"></a></h4>
<p>How many messages to prefetch at a time multiplied by the number of
concurrent processes.  The default is 4 (four messages for each
process).  The default setting is usually a good choice, however &#8211; if you
have very long running tasks waiting in the queue and you have to start the
workers, note that the first worker to start will receive four times the
number of messages initially.  Thus the tasks may not be fairly distributed
to the workers.</p>
</div>
</div>
<div class="section" id="task-result-backend-settings">
<span id="conf-result-backend"></span><h3><a class="toc-backref" href="#id8">Task result backend settings</a><a class="headerlink" href="#task-result-backend-settings" title="Permalink to this headline"></a></h3>
<div class="section" id="celery-result-backend">
<span id="std:setting-CELERY_RESULT_BACKEND"></span><h4>CELERY_RESULT_BACKEND<a class="headerlink" href="#celery-result-backend" title="Permalink to this headline"></a></h4>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name" colspan="2">Deprecated aliases:</th></tr>
<tr class="field"><td>&nbsp;</td><td class="field-body"><tt class="docutils literal"><span class="pre">CELERY_BACKEND</span></tt></td>
</tr>
</tbody>
</table>
<p>The backend used to store task results (tombstones).
Disabled by default.
Can be one of the following:</p>
<ul>
<li><dl class="first docutils">
<dt>database</dt>
<dd><p class="first last">Use a relational database supported by <a class="reference external" href="http://sqlalchemy.org">SQLAlchemy</a>.
See <a class="reference internal" href="#conf-database-result-backend"><em>Database backend settings</em></a>.</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>cache</dt>
<dd><p class="first last">Use <a class="reference external" href="http://memcached.org">memcached</a> to store the results.
See <a class="reference internal" href="#conf-cache-result-backend"><em>Cache backend settings</em></a>.</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>mongodb</dt>
<dd><p class="first last">Use <a class="reference external" href="http://mongodb.org">MongoDB</a> to store the results.
See <a class="reference internal" href="#conf-mongodb-result-backend"><em>MongoDB backend settings</em></a>.</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>redis</dt>
<dd><p class="first last">Use <a class="reference external" href="http://code.google.com/p/redis/">Redis</a> to store the results.
See <a class="reference internal" href="#conf-redis-result-backend"><em>Redis backend settings</em></a>.</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>tyrant</dt>
<dd><p class="first last">Use <a class="reference external" href="http://1978th.net/tokyotyrant/">Tokyo Tyrant</a> to store the results.
See <a class="reference internal" href="#conf-tyrant-result-backend"><em>Tokyo Tyrant backend settings</em></a>.</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>amqp</dt>
<dd><p class="first last">Send results back as AMQP messages
See <a class="reference internal" href="#conf-amqp-result-backend"><em>AMQP backend settings</em></a>.</p>
</dd>
</dl>
</li>
</ul>
</div>
<div class="section" id="celery-result-serializer">
<span id="std:setting-CELERY_RESULT_SERIALIZER"></span><h4>CELERY_RESULT_SERIALIZER<a class="headerlink" href="#celery-result-serializer" title="Permalink to this headline"></a></h4>
<p>Result serialization format.  Default is <cite>&#8220;pickle&#8221;</cite>. See
<a class="reference internal" href="userguide/executing.html#executing-serializers"><em>Serializers</em></a> for information about supported
serialization formats.</p>
</div>
</div>
<div class="section" id="database-backend-settings">
<span id="conf-database-result-backend"></span><h3><a class="toc-backref" href="#id9">Database backend settings</a><a class="headerlink" href="#database-backend-settings" title="Permalink to this headline"></a></h3>
<div class="section" id="celery-result-dburi">
<span id="std:setting-CELERY_RESULT_DBURI"></span><h4>CELERY_RESULT_DBURI<a class="headerlink" href="#celery-result-dburi" title="Permalink to this headline"></a></h4>
<p>Please see <a class="reference external" href="http://www.sqlalchemy.org/docs/core/engines.html#supported-databases">Supported Databases</a> for a table of supported databases.
To use this backend you need to configure it with an
<a class="reference external" href="http://www.sqlalchemy.org/docs/core/engines.html#database-urls">Connection String</a>, some examples include:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="c"># sqlite (filename)</span>
<span class="n">CELERY_RESULT_DBURI</span> <span class="o">=</span> <span class="s">&quot;sqlite:///celerydb.sqlite&quot;</span>

<span class="c"># mysql</span>
<span class="n">CELERY_RESULT_DBURI</span> <span class="o">=</span> <span class="s">&quot;mysql://scott:tiger@localhost/foo&quot;</span>

<span class="c"># postgresql</span>
<span class="n">CELERY_RESULT_DBURI</span> <span class="o">=</span> <span class="s">&quot;postgresql://scott:tiger@localhost/mydatabase&quot;</span>

<span class="c"># oracle</span>
<span class="n">CELERY_RESULT_DBURI</span> <span class="o">=</span> <span class="s">&quot;oracle://scott:tiger@127.0.0.1:1521/sidname&quot;</span>
</pre></div>
</div>
<p>See <a class="reference external" href="http://www.sqlalchemy.org/docs/core/engines.html#database-urls">Connection String</a> for more information about connection
strings.</p>
</div>
<div class="section" id="celery-result-engine-options">
<span id="std:setting-CELERY_RESULT_ENGINE_OPTIONS"></span><h4>CELERY_RESULT_ENGINE_OPTIONS<a class="headerlink" href="#celery-result-engine-options" title="Permalink to this headline"></a></h4>
<p>To specify additional SQLAlchemy database engine options you can use
the <a class="reference internal" href="#std:setting-CELERY_RESULT_ENGINE_OPTIONS"><tt class="xref std std-setting docutils literal"><span class="pre">CELERY_RESULT_ENGINE_OPTIONS</span></tt></a> setting:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="c"># echo enables verbose logging from SQLAlchemy.</span>
<span class="n">CELERY_RESULT_ENGINE_OPTIONS</span> <span class="o">=</span> <span class="p">{</span><span class="s">&quot;echo&quot;</span><span class="p">:</span> <span class="bp">True</span><span class="p">}</span>
</pre></div>
</div>
<p id="std:setting-CELERY_RESULT_DB_SHORT_LIVED_SESSIONS CELERY_RESULT_DB_SHORT_LIVED_SESSIONS = True">Short lived sessions are disabled by default.  If enabled they can drastically reduce
performance, especially on systems processing lots of tasks.  This option is useful
on low-traffic workers that experience errors as a result of cached database connections
going stale through inactivity.  For example, intermittent errors like
<cite>(OperationalError) (2006, &#8216;MySQL server has gone away&#8217;)</cite> can be fixed by enabling
short lived sessions.  This option only affects the database backend.</p>
</div>
<div class="section" id="example-configuration">
<h4>Example configuration<a class="headerlink" href="#example-configuration" title="Permalink to this headline"></a></h4>
<div class="highlight-python"><div class="highlight"><pre><span class="n">CELERY_RESULT_BACKEND</span> <span class="o">=</span> <span class="s">&quot;database&quot;</span>
<span class="n">CELERY_RESULT_DBURI</span> <span class="o">=</span> <span class="s">&quot;mysql://user:password@host/dbname&quot;</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="amqp-backend-settings">
<span id="conf-amqp-result-backend"></span><h3><a class="toc-backref" href="#id10">AMQP backend settings</a><a class="headerlink" href="#amqp-backend-settings" title="Permalink to this headline"></a></h3>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p>The AMQP backend requires RabbitMQ 1.1.0 or higher to automatically
expire results.  If you are running an older version of RabbitmQ
you should disable result expiration like this:</p>
<blockquote class="last">
<div>CELERY_TASK_RESULT_EXPIRES = None</div></blockquote>
</div>
<div class="section" id="celery-result-exchange">
<span id="std:setting-CELERY_RESULT_EXCHANGE"></span><h4>CELERY_RESULT_EXCHANGE<a class="headerlink" href="#celery-result-exchange" title="Permalink to this headline"></a></h4>
<p>Name of the exchange to publish results in.  Default is <cite>&#8220;celeryresults&#8221;</cite>.</p>
</div>
<div class="section" id="celery-result-exchange-type">
<span id="std:setting-CELERY_RESULT_EXCHANGE_TYPE"></span><h4>CELERY_RESULT_EXCHANGE_TYPE<a class="headerlink" href="#celery-result-exchange-type" title="Permalink to this headline"></a></h4>
<p>The exchange type of the result exchange.  Default is to use a <cite>direct</cite>
exchange.</p>
</div>
<div class="section" id="celery-result-persistent">
<span id="std:setting-CELERY_RESULT_PERSISTENT"></span><h4>CELERY_RESULT_PERSISTENT<a class="headerlink" href="#celery-result-persistent" title="Permalink to this headline"></a></h4>
<p>If set to <tt class="xref py py-const xref docutils literal"><span class="pre">True</span></tt>, result messages will be persistent.  This means the
messages will not be lost after a broker restart.  The default is for the
results to be transient.</p>
</div>
<div class="section" id="id1">
<h4>Example configuration<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h4>
<div class="highlight-python"><div class="highlight"><pre><span class="n">CELERY_RESULT_BACKEND</span> <span class="o">=</span> <span class="s">&quot;amqp&quot;</span>
<span class="n">CELERY_TASK_RESULT_EXPIRES</span> <span class="o">=</span> <span class="mi">18000</span>  <span class="c"># 5 hours.</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="cache-backend-settings">
<span id="conf-cache-result-backend"></span><h3><a class="toc-backref" href="#id11">Cache backend settings</a><a class="headerlink" href="#cache-backend-settings" title="Permalink to this headline"></a></h3>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The cache backend supports the <a class="reference external" href="http://sendapatch.se/projects/pylibmc/">pylibmc</a> and <cite>python-memcached</cite>
libraries.  The latter is used only if <a class="reference external" href="http://sendapatch.se/projects/pylibmc/">pylibmc</a> is not installed.</p>
</div>
<div class="section" id="celery-cache-backend">
<span id="std:setting-CELERY_CACHE_BACKEND"></span><h4>CELERY_CACHE_BACKEND<a class="headerlink" href="#celery-cache-backend" title="Permalink to this headline"></a></h4>
<p>Using a single memcached server:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">CELERY_CACHE_BACKEND</span> <span class="o">=</span> <span class="s">&#39;memcached://127.0.0.1:11211/&#39;</span>
</pre></div>
</div>
<p>Using multiple memcached servers:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">CELERY_RESULT_BACKEND</span> <span class="o">=</span> <span class="s">&quot;cache&quot;</span>
<span class="n">CELERY_CACHE_BACKEND</span> <span class="o">=</span> <span class="s">&#39;memcached://172.19.26.240:11211;172.19.26.242:11211/&#39;</span>
</pre></div>
</div>
<p id="std:setting-CELERY_CACHE_BACKEND_OPTIONS">The &#8220;dummy&#8221; backend stores the cache in memory only:</p>
<blockquote>
<div>CELERY_CACHE_BACKEND = &#8220;dummy&#8221;</div></blockquote>
</div>
<div class="section" id="celery-cache-backend-options">
<h4>CELERY_CACHE_BACKEND_OPTIONS<a class="headerlink" href="#celery-cache-backend-options" title="Permalink to this headline"></a></h4>
<p>You can set pylibmc options using the <a class="reference internal" href="#std:setting-CELERY_CACHE_BACKEND_OPTIONS"><tt class="xref std std-setting docutils literal"><span class="pre">CELERY_CACHE_BACKEND_OPTIONS</span></tt></a>
setting:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">CELERY_CACHE_BACKEND_OPTIONS</span> <span class="o">=</span> <span class="p">{</span><span class="s">&quot;binary&quot;</span><span class="p">:</span> <span class="bp">True</span><span class="p">,</span>
                                <span class="s">&quot;behaviors&quot;</span><span class="p">:</span> <span class="p">{</span><span class="s">&quot;tcp_nodelay&quot;</span><span class="p">:</span> <span class="bp">True</span><span class="p">}}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="tokyo-tyrant-backend-settings">
<span id="conf-tyrant-result-backend"></span><h3><a class="toc-backref" href="#id12">Tokyo Tyrant backend settings</a><a class="headerlink" href="#tokyo-tyrant-backend-settings" title="Permalink to this headline"></a></h3>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The Tokyo Tyrant backend requires the <tt class="xref py py-mod docutils literal"><span class="pre">pytyrant</span></tt> library:
<a class="reference external" href="http://pypi.python.org/pypi/pytyrant/">http://pypi.python.org/pypi/pytyrant/</a></p>
</div>
<p>This backend requires the following configuration directives to be set:</p>
<div class="section" id="tt-host">
<span id="std:setting-TT_HOST"></span><h4>TT_HOST<a class="headerlink" href="#tt-host" title="Permalink to this headline"></a></h4>
<p>Host name of the Tokyo Tyrant server.</p>
</div>
<div class="section" id="tt-port">
<span id="std:setting-TT_PORT"></span><h4>TT_PORT<a class="headerlink" href="#tt-port" title="Permalink to this headline"></a></h4>
<p>The port the Tokyo Tyrant server is listening to.</p>
</div>
<div class="section" id="id2">
<h4>Example configuration<a class="headerlink" href="#id2" title="Permalink to this headline"></a></h4>
<div class="highlight-python"><div class="highlight"><pre><span class="n">CELERY_RESULT_BACKEND</span> <span class="o">=</span> <span class="s">&quot;tyrant&quot;</span>
<span class="n">TT_HOST</span> <span class="o">=</span> <span class="s">&quot;localhost&quot;</span>
<span class="n">TT_PORT</span> <span class="o">=</span> <span class="mi">1978</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="redis-backend-settings">
<span id="conf-redis-result-backend"></span><h3><a class="toc-backref" href="#id13">Redis backend settings</a><a class="headerlink" href="#redis-backend-settings" title="Permalink to this headline"></a></h3>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p>The Redis backend requires the <tt class="xref py py-mod docutils literal"><span class="pre">redis</span></tt> library:
<a class="reference external" href="http://pypi.python.org/pypi/redis/">http://pypi.python.org/pypi/redis/</a></p>
<p>To install the redis package use <cite>pip</cite> or <cite>easy_install</cite>:</p>
<div class="last highlight-python"><pre>$ pip install redis</pre>
</div>
</div>
<p>This backend requires the following configuration directives to be set.</p>
<div class="section" id="celery-redis-host">
<span id="std:setting-CELERY_REDIS_HOST"></span><h4>CELERY_REDIS_HOST<a class="headerlink" href="#celery-redis-host" title="Permalink to this headline"></a></h4>
<p>Host name of the Redis database server. e.g. <cite>&#8220;localhost&#8221;</cite>.</p>
</div>
<div class="section" id="celery-redis-port">
<span id="std:setting-CELERY_REDIS_PORT"></span><h4>CELERY_REDIS_PORT<a class="headerlink" href="#celery-redis-port" title="Permalink to this headline"></a></h4>
<p>Port to the Redis database server. e.g. <cite>6379</cite>.</p>
</div>
<div class="section" id="celery-redis-db">
<span id="std:setting-CELERY_REDIS_DB"></span><h4>CELERY_REDIS_DB<a class="headerlink" href="#celery-redis-db" title="Permalink to this headline"></a></h4>
<p>Database number to use. Default is 0</p>
</div>
<div class="section" id="celery-redis-password">
<span id="std:setting-CELERY_REDIS_PASSWORD"></span><h4>CELERY_REDIS_PASSWORD<a class="headerlink" href="#celery-redis-password" title="Permalink to this headline"></a></h4>
<p>Password used to connect to the database.</p>
</div>
<div class="section" id="id3">
<h4>Example configuration<a class="headerlink" href="#id3" title="Permalink to this headline"></a></h4>
<div class="highlight-python"><div class="highlight"><pre><span class="n">CELERY_RESULT_BACKEND</span> <span class="o">=</span> <span class="s">&quot;redis&quot;</span>
<span class="n">CELERY_REDIS_HOST</span> <span class="o">=</span> <span class="s">&quot;localhost&quot;</span>
<span class="n">CELERY_REDIS_PORT</span> <span class="o">=</span> <span class="mi">6379</span>
<span class="n">CELERY_REDIS_DB</span> <span class="o">=</span> <span class="mi">0</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="mongodb-backend-settings">
<span id="conf-mongodb-result-backend"></span><h3><a class="toc-backref" href="#id14">MongoDB backend settings</a><a class="headerlink" href="#mongodb-backend-settings" title="Permalink to this headline"></a></h3>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The MongoDB backend requires the <tt class="xref py py-mod docutils literal"><span class="pre">pymongo</span></tt> library:
<a class="reference external" href="http://github.com/mongodb/mongo-python-driver/tree/master">http://github.com/mongodb/mongo-python-driver/tree/master</a></p>
</div>
<div class="section" id="celery-mongodb-backend-settings">
<span id="std:setting-CELERY_MONGODB_BACKEND_SETTINGS"></span><h4>CELERY_MONGODB_BACKEND_SETTINGS<a class="headerlink" href="#celery-mongodb-backend-settings" title="Permalink to this headline"></a></h4>
<p>This is a dict supporting the following keys:</p>
<ul>
<li><dl class="first docutils">
<dt>host</dt>
<dd><p class="first last">Host name of the MongoDB server. Defaults to &#8220;localhost&#8221;.</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>port</dt>
<dd><p class="first last">The port the MongoDB server is listening to. Defaults to 27017.</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>user</dt>
<dd><p class="first last">User name to authenticate to the MongoDB server as (optional).</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>password</dt>
<dd><p class="first last">Password to authenticate to the MongoDB server (optional).</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>database</dt>
<dd><p class="first last">The database name to connect to. Defaults to &#8220;celery&#8221;.</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>taskmeta_collection</dt>
<dd><p class="first last">The collection name to store task meta data.
Defaults to &#8220;celery_taskmeta&#8221;.</p>
</dd>
</dl>
</li>
</ul>
</div>
<div class="section" id="example-mongodb-result-config">
<span id="id4"></span><h4>Example configuration<a class="headerlink" href="#example-mongodb-result-config" title="Permalink to this headline"></a></h4>
<div class="highlight-python"><div class="highlight"><pre><span class="n">CELERY_RESULT_BACKEND</span> <span class="o">=</span> <span class="s">&quot;mongodb&quot;</span>
<span class="n">CELERY_MONGODB_BACKEND_SETTINGS</span> <span class="o">=</span> <span class="p">{</span>
    <span class="s">&quot;host&quot;</span><span class="p">:</span> <span class="s">&quot;192.168.1.100&quot;</span><span class="p">,</span>
    <span class="s">&quot;port&quot;</span><span class="p">:</span> <span class="mi">30000</span><span class="p">,</span>
    <span class="s">&quot;database&quot;</span><span class="p">:</span> <span class="s">&quot;mydb&quot;</span><span class="p">,</span>
    <span class="s">&quot;taskmeta_collection&quot;</span><span class="p">:</span> <span class="s">&quot;my_taskmeta_collection&quot;</span><span class="p">,</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="message-routing">
<span id="conf-messaging"></span><h3><a class="toc-backref" href="#id15">Message Routing</a><a class="headerlink" href="#message-routing" title="Permalink to this headline"></a></h3>
<span class="target" id="conf-messaging-routing"></span><div class="section" id="celery-queues">
<span id="std:setting-CELERY_QUEUES"></span><h4>CELERY_QUEUES<a class="headerlink" href="#celery-queues" title="Permalink to this headline"></a></h4>
<p>The mapping of queues the worker consumes from.  This is a dictionary
of queue name/options.  See <a class="reference internal" href="userguide/routing.html#guide-routing"><em>Routing Tasks</em></a> for more information.</p>
<p>The default is a queue/exchange/binding key of <cite>&#8220;celery&#8221;</cite>, with
exchange type <cite>direct</cite>.</p>
<p>You don&#8217;t have to care about this unless you want custom routing facilities.</p>
</div>
<div class="section" id="celery-routes">
<span id="std:setting-CELERY_ROUTES"></span><h4>CELERY_ROUTES<a class="headerlink" href="#celery-routes" title="Permalink to this headline"></a></h4>
<p>A list of routers, or a single router used to route tasks to queues.
When deciding the final destination of a task the routers are consulted
in order.  See <a class="reference internal" href="userguide/routing.html#routers"><em>Routers</em></a> for more information.</p>
</div>
<div class="section" id="celery-create-missing-queues">
<span id="std:setting-CELERY_CREATE_MISSING_QUEUES"></span><h4>CELERY_CREATE_MISSING_QUEUES<a class="headerlink" href="#celery-create-missing-queues" title="Permalink to this headline"></a></h4>
<p>If enabled (default), any queues specified that is not defined in
<a class="reference internal" href="#std:setting-CELERY_QUEUES"><tt class="xref std std-setting docutils literal"><span class="pre">CELERY_QUEUES</span></tt></a> will be automatically created. See
<a class="reference internal" href="userguide/routing.html#routing-automatic"><em>Automatic routing</em></a>.</p>
</div>
<div class="section" id="celery-default-queue">
<span id="std:setting-CELERY_DEFAULT_QUEUE"></span><h4>CELERY_DEFAULT_QUEUE<a class="headerlink" href="#celery-default-queue" title="Permalink to this headline"></a></h4>
<p>The queue used by default, if no custom queue is specified.  This queue must
be listed in <a class="reference internal" href="#std:setting-CELERY_QUEUES"><tt class="xref std std-setting docutils literal"><span class="pre">CELERY_QUEUES</span></tt></a>.  The default is: <cite>celery</cite>.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="userguide/routing.html#routing-changing-default-queue"><em>Changing the name of the default queue</em></a></p>
</div>
</div>
<div class="section" id="celery-default-exchange">
<span id="std:setting-CELERY_DEFAULT_EXCHANGE"></span><h4>CELERY_DEFAULT_EXCHANGE<a class="headerlink" href="#celery-default-exchange" title="Permalink to this headline"></a></h4>
<p>Name of the default exchange to use when no custom exchange is
specified.  The default is: <cite>celery</cite>.</p>
</div>
<div class="section" id="celery-default-exchange-type">
<span id="std:setting-CELERY_DEFAULT_EXCHANGE_TYPE"></span><h4>CELERY_DEFAULT_EXCHANGE_TYPE<a class="headerlink" href="#celery-default-exchange-type" title="Permalink to this headline"></a></h4>
<p>Default exchange type used when no custom exchange is specified.
The default is: <cite>direct</cite>.</p>
</div>
<div class="section" id="celery-default-routing-key">
<span id="std:setting-CELERY_DEFAULT_ROUTING_KEY"></span><h4>CELERY_DEFAULT_ROUTING_KEY<a class="headerlink" href="#celery-default-routing-key" title="Permalink to this headline"></a></h4>
<p>The default routing key used when sending tasks.
The default is: <cite>celery</cite>.</p>
</div>
<div class="section" id="celery-default-delivery-mode">
<span id="std:setting-CELERY_DEFAULT_DELIVERY_MODE"></span><h4>CELERY_DEFAULT_DELIVERY_MODE<a class="headerlink" href="#celery-default-delivery-mode" title="Permalink to this headline"></a></h4>
<p>Can be <cite>transient</cite> or <cite>persistent</cite>.  The default is to send
persistent messages.</p>
</div>
</div>
<div class="section" id="broker-settings">
<span id="conf-broker-settings"></span><h3><a class="toc-backref" href="#id16">Broker Settings</a><a class="headerlink" href="#broker-settings" title="Permalink to this headline"></a></h3>
<div class="section" id="broker-transport">
<span id="std:setting-BROKER_TRANSPORT"></span><h4>BROKER_TRANSPORT<a class="headerlink" href="#broker-transport" title="Permalink to this headline"></a></h4>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Aliases:</th><td class="field-body"><tt class="docutils literal"><span class="pre">BROKER_BACKEND</span></tt></td>
</tr>
<tr class="field"><th class="field-name" colspan="2">Deprecated aliases:</th></tr>
<tr class="field"><td>&nbsp;</td><td class="field-body"><tt class="docutils literal"><span class="pre">CARROT_BACKEND</span></tt></td>
</tr>
</tbody>
</table>
<p>The Kombu transport to use.  Default is <tt class="docutils literal"><span class="pre">amqplib</span></tt>.</p>
<p>You can use a custom transport class name, or select one of the
built-in transports: <tt class="docutils literal"><span class="pre">amqplib</span></tt>, <tt class="docutils literal"><span class="pre">pika</span></tt>, <tt class="docutils literal"><span class="pre">redis</span></tt>, <tt class="docutils literal"><span class="pre">beanstalk</span></tt>,
<tt class="docutils literal"><span class="pre">sqlalchemy</span></tt>, <tt class="docutils literal"><span class="pre">django</span></tt>, <tt class="docutils literal"><span class="pre">mongodb</span></tt>, <tt class="docutils literal"><span class="pre">couchdb</span></tt>.</p>
</div>
<div class="section" id="broker-url">
<span id="std:setting-BROKER_URL"></span><h4>BROKER_URL<a class="headerlink" href="#broker-url" title="Permalink to this headline"></a></h4>
<p>Default broker URL.  This must be an URL in the form of:</p>
<div class="highlight-python"><pre>transport://userid:password@hostname:port/virtual_host</pre>
</div>
<p>Only the scheme part (<tt class="docutils literal"><span class="pre">transport://</span></tt>) is required, the rest
is optional, and defaults to the specific transports default values.</p>
<p>If this setting is defined it will override a subset of the
other <tt class="docutils literal"><span class="pre">BROKER</span></tt> options. These options are <a class="reference internal" href="#std:setting-BROKER_HOST"><tt class="xref std std-setting docutils literal"><span class="pre">BROKER_HOST</span></tt></a>,
<a class="reference internal" href="#std:setting-BROKER_USER"><tt class="xref std std-setting docutils literal"><span class="pre">BROKER_USER</span></tt></a>, <a class="reference internal" href="#std:setting-BROKER_PASSWORD"><tt class="xref std std-setting docutils literal"><span class="pre">BROKER_PASSWORD</span></tt></a>, <a class="reference internal" href="#std:setting-BROKER_PORT"><tt class="xref std std-setting docutils literal"><span class="pre">BROKER_PORT</span></tt></a>,
and <a class="reference internal" href="#std:setting-BROKER_VHOST"><tt class="xref std std-setting docutils literal"><span class="pre">BROKER_VHOST</span></tt></a>.</p>
<p>See the Kombu documentation for more information about broker URLs.</p>
</div>
<div class="section" id="broker-host">
<span id="std:setting-BROKER_HOST"></span><h4>BROKER_HOST<a class="headerlink" href="#broker-host" title="Permalink to this headline"></a></h4>
<p>Hostname of the broker.</p>
</div>
<div class="section" id="broker-port">
<span id="std:setting-BROKER_PORT"></span><h4>BROKER_PORT<a class="headerlink" href="#broker-port" title="Permalink to this headline"></a></h4>
<p>Custom port of the broker.  Default is to use the default port for the
selected backend.</p>
</div>
<div class="section" id="broker-user">
<span id="std:setting-BROKER_USER"></span><h4>BROKER_USER<a class="headerlink" href="#broker-user" title="Permalink to this headline"></a></h4>
<p>Username to connect as.</p>
</div>
<div class="section" id="broker-password">
<span id="std:setting-BROKER_PASSWORD"></span><h4>BROKER_PASSWORD<a class="headerlink" href="#broker-password" title="Permalink to this headline"></a></h4>
<p>Password to connect with.</p>
</div>
<div class="section" id="broker-vhost">
<span id="std:setting-BROKER_VHOST"></span><h4>BROKER_VHOST<a class="headerlink" href="#broker-vhost" title="Permalink to this headline"></a></h4>
<p>Virtual host.  Default is <cite>&#8220;/&#8221;</cite>.</p>
</div>
<div class="section" id="broker-use-ssl">
<span id="std:setting-BROKER_USE_SSL"></span><h4>BROKER_USE_SSL<a class="headerlink" href="#broker-use-ssl" title="Permalink to this headline"></a></h4>
<p>Use SSL to connect to the broker.  Off by default.  This may not be supported
by all transports.</p>
</div>
<div class="section" id="broker-pool-limit">
<span id="std:setting-BROKER_POOL_LIMIT"></span><h4>BROKER_POOL_LIMIT<a class="headerlink" href="#broker-pool-limit" title="Permalink to this headline"></a></h4>
<p class="versionadded">
<span class="versionmodified">New in version 2.3.</span></p>
<p>The maximum number of connections that can be open in the connection pool.</p>
<p>A good default value could be 10, or more if you&#8217;re using eventlet/gevent
or lots of threads.</p>
<p>If set to <tt class="xref py py-const xref docutils literal"><span class="pre">None</span></tt> or 0 the connection pool will be disabled and
connections will be established and closed for every use.</p>
<p><strong>Disabled by default.</strong></p>
</div>
<div class="section" id="broker-connection-timeout">
<span id="std:setting-BROKER_CONNECTION_TIMEOUT"></span><h4>BROKER_CONNECTION_TIMEOUT<a class="headerlink" href="#broker-connection-timeout" title="Permalink to this headline"></a></h4>
<p>The default timeout in seconds before we give up establishing a connection
to the AMQP server.  Default is 4 seconds.</p>
</div>
<div class="section" id="broker-connection-retry">
<span id="std:setting-BROKER_CONNECTION_RETRY"></span><h4>BROKER_CONNECTION_RETRY<a class="headerlink" href="#broker-connection-retry" title="Permalink to this headline"></a></h4>
<p>Automatically try to re-establish the connection to the AMQP broker if lost.</p>
<p>The time between retries is increased for each retry, and is
not exhausted before <a class="reference internal" href="#std:setting-BROKER_CONNECTION_MAX_RETRIES"><tt class="xref std std-setting docutils literal"><span class="pre">BROKER_CONNECTION_MAX_RETRIES</span></tt></a> is
exceeded.</p>
<p>This behavior is on by default.</p>
</div>
<div class="section" id="broker-connection-max-retries">
<span id="std:setting-BROKER_CONNECTION_MAX_RETRIES"></span><h4>BROKER_CONNECTION_MAX_RETRIES<a class="headerlink" href="#broker-connection-max-retries" title="Permalink to this headline"></a></h4>
<p>Maximum number of retries before we give up re-establishing a connection
to the AMQP broker.</p>
<p>If this is set to <tt class="xref py py-const docutils literal"><span class="pre">0</span></tt> or <tt class="xref py py-const xref docutils literal"><span class="pre">None</span></tt>, we will retry forever.</p>
<p>Default is 100 retries.</p>
</div>
<div class="section" id="broker-transport-options">
<span id="std:setting-BROKER_TRANSPORT_OPTIONS"></span><h4>BROKER_TRANSPORT_OPTIONS<a class="headerlink" href="#broker-transport-options" title="Permalink to this headline"></a></h4>
<p class="versionadded">
<span class="versionmodified">New in version 2.2.</span></p>
<p>A dict of additional options passed to the underlying transport.</p>
<p>See your transport user manual for supported options (if any).</p>
</div>
</div>
<div class="section" id="task-execution-settings">
<span id="conf-task-execution"></span><h3><a class="toc-backref" href="#id17">Task execution settings</a><a class="headerlink" href="#task-execution-settings" title="Permalink to this headline"></a></h3>
<div class="section" id="celery-always-eager">
<span id="std:setting-CELERY_ALWAYS_EAGER"></span><h4>CELERY_ALWAYS_EAGER<a class="headerlink" href="#celery-always-eager" title="Permalink to this headline"></a></h4>
<p>If this is <tt class="xref py py-const xref docutils literal"><span class="pre">True</span></tt>, all tasks will be executed locally by blocking until
the task returns.  <tt class="docutils literal"><span class="pre">apply_async()</span></tt> and <tt class="docutils literal"><span class="pre">Task.delay()</span></tt> will return
an <a class="reference internal" href="reference/celery.result.html#celery.result.EagerResult" title="celery.result.EagerResult"><tt class="xref py py-class docutils literal"><span class="pre">EagerResult</span></tt></a> instance, which emulates the API
and behavior of <a class="reference internal" href="reference/celery.result.html#celery.result.AsyncResult" title="celery.result.AsyncResult"><tt class="xref py py-class docutils literal"><span class="pre">AsyncResult</span></tt></a>, except the result
is already evaluated.</p>
<p>That is, tasks will be executed locally instead of being sent to
the queue.</p>
</div>
<div class="section" id="celery-eager-propagates-exceptions">
<span id="std:setting-CELERY_EAGER_PROPAGATES_EXCEPTIONS"></span><h4>CELERY_EAGER_PROPAGATES_EXCEPTIONS<a class="headerlink" href="#celery-eager-propagates-exceptions" title="Permalink to this headline"></a></h4>
<p>If this is <tt class="xref py py-const xref docutils literal"><span class="pre">True</span></tt>, eagerly executed tasks (applied by <cite>task.apply()</cite>,
or when the <a class="reference internal" href="#std:setting-CELERY_ALWAYS_EAGER"><tt class="xref std std-setting docutils literal"><span class="pre">CELERY_ALWAYS_EAGER</span></tt></a> setting is enabled), will
propagate exceptions.</p>
<p>It&#8217;s the same as always running <tt class="docutils literal"><span class="pre">apply()</span></tt> with <tt class="docutils literal"><span class="pre">throw=True</span></tt>.</p>
</div>
<div class="section" id="celery-ignore-result">
<span id="std:setting-CELERY_IGNORE_RESULT"></span><h4>CELERY_IGNORE_RESULT<a class="headerlink" href="#celery-ignore-result" title="Permalink to this headline"></a></h4>
<p>Whether to store the task return values or not (tombstones).
If you still want to store errors, just not successful return values,
you can set <a class="reference internal" href="#std:setting-CELERY_STORE_ERRORS_EVEN_IF_IGNORED"><tt class="xref std std-setting docutils literal"><span class="pre">CELERY_STORE_ERRORS_EVEN_IF_IGNORED</span></tt></a>.</p>
</div>
<div class="section" id="celery-message-compression">
<span id="std:setting-CELERY_MESSAGE_COMPRESSION"></span><h4>CELERY_MESSAGE_COMPRESSION<a class="headerlink" href="#celery-message-compression" title="Permalink to this headline"></a></h4>
<p>Default compression used for task messages.
Can be <tt class="docutils literal"><span class="pre">&quot;gzip&quot;</span></tt>, <tt class="docutils literal"><span class="pre">&quot;bzip2&quot;</span></tt> (if available), or any custom
compression schemes registered in the Kombu compression registry.</p>
<p>The default is to send uncompressed messages.</p>
</div>
<div class="section" id="celery-task-result-expires">
<span id="std:setting-CELERY_TASK_RESULT_EXPIRES"></span><h4>CELERY_TASK_RESULT_EXPIRES<a class="headerlink" href="#celery-task-result-expires" title="Permalink to this headline"></a></h4>
<p>Time (in seconds, or a <a class="reference external" href="http://docs.python.org/library/datetime.html#datetime.timedelta" title="(in Python v2.7)"><tt class="xref py py-class docutils literal"><span class="pre">timedelta</span></tt></a> object) for when after
stored task tombstones will be deleted.</p>
<p>A built-in periodic task will delete the results after this time
(<tt class="xref py py-class docutils literal"><span class="pre">celery.task.backend_cleanup</span></tt>).</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p>For the moment this only works with the amqp, database, cache, redis and MongoDB
backends.</p>
<p class="last">When using the database or MongoDB backends, <cite>celerybeat</cite> must be
running for the results to be expired.</p>
</div>
</div>
<div class="section" id="celery-max-cached-results">
<span id="std:setting-CELERY_MAX_CACHED_RESULTS"></span><h4>CELERY_MAX_CACHED_RESULTS<a class="headerlink" href="#celery-max-cached-results" title="Permalink to this headline"></a></h4>
<p>Result backends caches ready results used by the client.</p>
<p>This is the total number of results to cache before older results are evicted.
The default is 5000.</p>
</div>
<div class="section" id="celery-track-started">
<span id="std:setting-CELERY_TRACK_STARTED"></span><h4>CELERY_TRACK_STARTED<a class="headerlink" href="#celery-track-started" title="Permalink to this headline"></a></h4>
<p>If <tt class="xref py py-const xref docutils literal"><span class="pre">True</span></tt> the task will report its status as &#8220;started&#8221; when the
task is executed by a worker.  The default value is <tt class="xref py py-const xref docutils literal"><span class="pre">False</span></tt> as
the normal behaviour is to not report that level of granularity.  Tasks
are either pending, finished, or waiting to be retried.  Having a &#8220;started&#8221;
state can be useful for when there are long running tasks and there is a
need to report which task is currently running.</p>
</div>
<div class="section" id="celery-task-serializer">
<span id="std:setting-CELERY_TASK_SERIALIZER"></span><h4>CELERY_TASK_SERIALIZER<a class="headerlink" href="#celery-task-serializer" title="Permalink to this headline"></a></h4>
<p>A string identifying the default serialization method to use.  Can be
<cite>pickle</cite> (default), <cite>json</cite>, <cite>yaml</cite>, <cite>msgpack</cite> or any custom serialization
methods that have been registered with <tt class="xref py py-mod docutils literal"><span class="pre">kombu.serialization.registry</span></tt>.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="userguide/executing.html#executing-serializers"><em>Serializers</em></a>.</p>
</div>
</div>
<div class="section" id="celery-task-publish-retry">
<span id="std:setting-CELERY_TASK_PUBLISH_RETRY"></span><h4>CELERY_TASK_PUBLISH_RETRY<a class="headerlink" href="#celery-task-publish-retry" title="Permalink to this headline"></a></h4>
<p class="versionadded">
<span class="versionmodified">New in version 2.2.</span></p>
<p>Decides if publishing task messages will be retried in the case
of connection loss or other connection errors.
See also <a class="reference internal" href="#std:setting-CELERY_TASK_PUBLISH_RETRY_POLICY"><tt class="xref std std-setting docutils literal"><span class="pre">CELERY_TASK_PUBLISH_RETRY_POLICY</span></tt></a>.</p>
<p>Disabled by default.</p>
</div>
<div class="section" id="celery-task-publish-retry-policy">
<span id="std:setting-CELERY_TASK_PUBLISH_RETRY_POLICY"></span><h4>CELERY_TASK_PUBLISH_RETRY_POLICY<a class="headerlink" href="#celery-task-publish-retry-policy" title="Permalink to this headline"></a></h4>
<p class="versionadded">
<span class="versionmodified">New in version 2.2.</span></p>
<p>Defines the default policy when retrying publishing a task message in
the case of connection loss or other connection errors.</p>
<p>This is a mapping that must contain the following keys:</p>
<blockquote>
<div><ul>
<li><p class="first"><cite>max_retries</cite></p>
<blockquote>
<div><p>Maximum number of retries before giving up, in this case the
exception that caused the retry to fail will be raised.</p>
<p>A value of 0 or <tt class="xref py py-const xref docutils literal"><span class="pre">None</span></tt> means it will retry forever.</p>
<p>The default is to retry 3 times.</p>
</div></blockquote>
</li>
<li><p class="first"><cite>interval_start</cite></p>
<blockquote>
<div><p>Defines the number of seconds (float or integer) to wait between
retries.  Default is 0, which means the first retry will be
instantaneous.</p>
</div></blockquote>
</li>
<li><p class="first"><cite>interval_step</cite></p>
<blockquote>
<div><p>On each consecutive retry this number will be added to the retry
delay (float or integer).  Default is 0.2.</p>
</div></blockquote>
</li>
<li><p class="first"><cite>interval_max</cite></p>
<blockquote>
<div><p>Maximum number of seconds (float or integer) to wait between
retries.  Default is 0.2.</p>
</div></blockquote>
</li>
</ul>
</div></blockquote>
<p>With the default policy of:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">{</span><span class="s">&quot;max_retries&quot;</span><span class="p">:</span> <span class="mi">3</span><span class="p">,</span>
 <span class="s">&quot;interval_start&quot;</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
 <span class="s">&quot;interval_step&quot;</span><span class="p">:</span> <span class="mf">0.2</span><span class="p">,</span>
 <span class="s">&quot;interval_max&quot;</span><span class="p">:</span> <span class="mf">0.2</span><span class="p">}</span>
</pre></div>
</div>
<p>the maximum time spent retrying will be 0.4 seconds.  It is set relatively
short by default because a connection failure could lead to a retry pile effect
if the broker connection is down: e.g. many web server processes waiting
to retry blocking other incoming requests.</p>
</div>
<div class="section" id="celery-default-rate-limit">
<span id="std:setting-CELERY_DEFAULT_RATE_LIMIT"></span><h4>CELERY_DEFAULT_RATE_LIMIT<a class="headerlink" href="#celery-default-rate-limit" title="Permalink to this headline"></a></h4>
<p>The global default rate limit for tasks.</p>
<p>This value is used for tasks that does not have a custom rate limit
The default is no rate limit.</p>
</div>
<div class="section" id="celery-disable-rate-limits">
<span id="std:setting-CELERY_DISABLE_RATE_LIMITS"></span><h4>CELERY_DISABLE_RATE_LIMITS<a class="headerlink" href="#celery-disable-rate-limits" title="Permalink to this headline"></a></h4>
<p>Disable all rate limits, even if tasks has explicit rate limits set.</p>
</div>
<div class="section" id="celery-acks-late">
<span id="std:setting-CELERY_ACKS_LATE"></span><h4>CELERY_ACKS_LATE<a class="headerlink" href="#celery-acks-late" title="Permalink to this headline"></a></h4>
<p>Late ack means the task messages will be acknowledged <strong>after</strong> the task
has been executed, not <em>just before</em>, which is the default behavior.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">FAQ: <a class="reference internal" href="faq.html#faq-acks-late-vs-retry"><em>Should I use retry or acks_late?</em></a>.</p>
</div>
</div>
</div>
<div class="section" id="worker-celeryd">
<span id="conf-celeryd"></span><h3><a class="toc-backref" href="#id18">Worker: celeryd</a><a class="headerlink" href="#worker-celeryd" title="Permalink to this headline"></a></h3>
<div class="section" id="celery-imports">
<span id="std:setting-CELERY_IMPORTS"></span><h4>CELERY_IMPORTS<a class="headerlink" href="#celery-imports" title="Permalink to this headline"></a></h4>
<p>A sequence of modules to import when the celery daemon starts.</p>
<p>This is used to specify the task modules to import, but also
to import signal handlers and additional remote control commands, etc.</p>
</div>
<div class="section" id="celeryd-max-tasks-per-child">
<span id="std:setting-CELERYD_MAX_TASKS_PER_CHILD"></span><h4>CELERYD_MAX_TASKS_PER_CHILD<a class="headerlink" href="#celeryd-max-tasks-per-child" title="Permalink to this headline"></a></h4>
<p>Maximum number of tasks a pool worker process can execute before
it&#8217;s replaced with a new one.  Default is no limit.</p>
</div>
<div class="section" id="celeryd-task-time-limit">
<span id="std:setting-CELERYD_TASK_TIME_LIMIT"></span><h4>CELERYD_TASK_TIME_LIMIT<a class="headerlink" href="#celeryd-task-time-limit" title="Permalink to this headline"></a></h4>
<p>Task hard time limit in seconds.  The worker processing the task will
be killed and replaced with a new one when this is exceeded.</p>
</div>
<div class="section" id="celeryd-task-soft-time-limit">
<span id="std:setting-CELERYD_TASK_SOFT_TIME_LIMIT"></span><h4>CELERYD_TASK_SOFT_TIME_LIMIT<a class="headerlink" href="#celeryd-task-soft-time-limit" title="Permalink to this headline"></a></h4>
<p>Task soft time limit in seconds.</p>
<p>The <a class="reference internal" href="reference/celery.exceptions.html#celery.exceptions.SoftTimeLimitExceeded" title="celery.exceptions.SoftTimeLimitExceeded"><tt class="xref py py-exc docutils literal"><span class="pre">SoftTimeLimitExceeded</span></tt></a> exception will be
raised when this is exceeded.  The task can catch this to
e.g. clean up before the hard time limit comes.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">celery.task</span> <span class="kn">import</span> <span class="n">task</span>
<span class="kn">from</span> <span class="nn">celery.exceptions</span> <span class="kn">import</span> <span class="n">SoftTimeLimitExceeded</span>

<span class="nd">@task</span><span class="p">()</span>
<span class="k">def</span> <span class="nf">mytask</span><span class="p">():</span>
    <span class="k">try</span><span class="p">:</span>
        <span class="k">return</span> <span class="n">do_work</span><span class="p">()</span>
    <span class="k">except</span> <span class="n">SoftTimeLimitExceeded</span><span class="p">:</span>
        <span class="n">cleanup_in_a_hurry</span><span class="p">()</span>
</pre></div>
</div>
</div>
<div class="section" id="celery-store-errors-even-if-ignored">
<span id="std:setting-CELERY_STORE_ERRORS_EVEN_IF_IGNORED"></span><h4>CELERY_STORE_ERRORS_EVEN_IF_IGNORED<a class="headerlink" href="#celery-store-errors-even-if-ignored" title="Permalink to this headline"></a></h4>
<p>If set, the worker stores all task errors in the result store even if
<tt class="xref py py-attr docutils literal"><span class="pre">Task.ignore_result</span></tt> is on.</p>
</div>
<div class="section" id="celeryd-state-db">
<span id="std:setting-CELERYD_STATE_DB"></span><h4>CELERYD_STATE_DB<a class="headerlink" href="#celeryd-state-db" title="Permalink to this headline"></a></h4>
<p>Name of the file used to stores persistent worker state (like revoked tasks).
Can be a relative or absolute path, but be aware that the suffix <cite>.db</cite>
may be appended to the file name (depending on Python version).</p>
<p>Can also be set via the <em class="xref std std-option">--statedb</em> argument to
<a class="reference internal" href="reference/celery.bin.celeryd.html#module-celery.bin.celeryd" title="celery.bin.celeryd"><tt class="xref py py-mod docutils literal"><span class="pre">celeryd</span></tt></a>.</p>
<p>Not enabled by default.</p>
</div>
<div class="section" id="celeryd-eta-scheduler-precision">
<span id="std:setting-CELERYD_ETA_SCHEDULER_PRECISION"></span><h4>CELERYD_ETA_SCHEDULER_PRECISION<a class="headerlink" href="#celeryd-eta-scheduler-precision" title="Permalink to this headline"></a></h4>
<p>Set the maximum time in seconds that the ETA scheduler can sleep between
rechecking the schedule.  Default is 1 second.</p>
<p>Setting this value to 1 second means the schedulers precision will
be 1 second. If you need near millisecond precision you can set this to 0.1.</p>
</div>
</div>
<div class="section" id="error-e-mails">
<span id="conf-error-mails"></span><h3><a class="toc-backref" href="#id19">Error E-Mails</a><a class="headerlink" href="#error-e-mails" title="Permalink to this headline"></a></h3>
<div class="section" id="celery-send-task-error-emails">
<span id="std:setting-CELERY_SEND_TASK_ERROR_EMAILS"></span><h4>CELERY_SEND_TASK_ERROR_EMAILS<a class="headerlink" href="#celery-send-task-error-emails" title="Permalink to this headline"></a></h4>
<p>The default value for the <cite>Task.send_error_emails</cite> attribute, which if
set to <tt class="xref py py-const xref docutils literal"><span class="pre">True</span></tt> means errors occurring during task execution will be
sent to <a class="reference internal" href="#std:setting-ADMINS"><tt class="xref std std-setting docutils literal"><span class="pre">ADMINS</span></tt></a> by email.</p>
</div>
<div class="section" id="admins">
<span id="std:setting-ADMINS"></span><h4>ADMINS<a class="headerlink" href="#admins" title="Permalink to this headline"></a></h4>
<p>List of <cite>(name, email_address)</cite> tuples for the administrators that should
receive error emails.</p>
</div>
<div class="section" id="server-email">
<span id="std:setting-SERVER_EMAIL"></span><h4>SERVER_EMAIL<a class="headerlink" href="#server-email" title="Permalink to this headline"></a></h4>
<p>The email address this worker sends emails from.
Default is <a class="reference external" href="mailto:celery&#37;&#52;&#48;localhost">celery<span>&#64;</span>localhost</a>.</p>
</div>
<div class="section" id="email-host">
<span id="std:setting-EMAIL_HOST"></span><h4>EMAIL_HOST<a class="headerlink" href="#email-host" title="Permalink to this headline"></a></h4>
<p>The mail server to use.  Default is <cite>&#8220;localhost&#8221;</cite>.</p>
</div>
<div class="section" id="email-host-user">
<span id="std:setting-EMAIL_HOST_USER"></span><h4>EMAIL_HOST_USER<a class="headerlink" href="#email-host-user" title="Permalink to this headline"></a></h4>
<p>User name (if required) to log on to the mail server with.</p>
</div>
<div class="section" id="email-host-password">
<span id="std:setting-EMAIL_HOST_PASSWORD"></span><h4>EMAIL_HOST_PASSWORD<a class="headerlink" href="#email-host-password" title="Permalink to this headline"></a></h4>
<p>Password (if required) to log on to the mail server with.</p>
</div>
<div class="section" id="email-port">
<span id="std:setting-EMAIL_PORT"></span><h4>EMAIL_PORT<a class="headerlink" href="#email-port" title="Permalink to this headline"></a></h4>
<p>The port the mail server is listening on.  Default is <cite>25</cite>.</p>
</div>
<div class="section" id="email-use-ssl">
<span id="std:setting-EMAIL_USE_SSL"></span><h4>EMAIL_USE_SSL<a class="headerlink" href="#email-use-ssl" title="Permalink to this headline"></a></h4>
<p>Use SSL when connecting to the SMTP server.  Disabled by default.</p>
</div>
<div class="section" id="email-use-tls">
<span id="std:setting-EMAIL_USE_TLS"></span><h4>EMAIL_USE_TLS<a class="headerlink" href="#email-use-tls" title="Permalink to this headline"></a></h4>
<p>Use TLS when connecting to the SMTP server.  Disabled by default.</p>
</div>
<div class="section" id="email-timeout">
<span id="std:setting-EMAIL_TIMEOUT"></span><h4>EMAIL_TIMEOUT<a class="headerlink" href="#email-timeout" title="Permalink to this headline"></a></h4>
<p>Timeout in seconds for when we give up trying to connect
to the SMTP server when sending emails.</p>
<p>The default is 2 seconds.</p>
</div>
<div class="section" id="example-e-mail-configuration">
<span id="conf-example-error-mail-config"></span><h4>Example E-Mail configuration<a class="headerlink" href="#example-e-mail-configuration" title="Permalink to this headline"></a></h4>
<p>This configuration enables the sending of error emails to
<a class="reference external" href="mailto:george&#37;&#52;&#48;vandelay&#46;com">george<span>&#64;</span>vandelay<span>&#46;</span>com</a> and <a class="reference external" href="mailto:kramer&#37;&#52;&#48;vandelay&#46;com">kramer<span>&#64;</span>vandelay<span>&#46;</span>com</a>:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="c"># Enables error emails.</span>
<span class="n">CELERY_SEND_TASK_ERROR_EMAILS</span> <span class="o">=</span> <span class="bp">True</span>

<span class="c"># Name and email addresses of recipients</span>
<span class="n">ADMINS</span> <span class="o">=</span> <span class="p">(</span>
    <span class="p">(</span><span class="s">&quot;George Costanza&quot;</span><span class="p">,</span> <span class="s">&quot;george@vandelay.com&quot;</span><span class="p">),</span>
    <span class="p">(</span><span class="s">&quot;Cosmo Kramer&quot;</span><span class="p">,</span> <span class="s">&quot;kosmo@vandelay.com&quot;</span><span class="p">),</span>
<span class="p">)</span>

<span class="c"># Email address used as sender (From field).</span>
<span class="n">SERVER_EMAIL</span> <span class="o">=</span> <span class="s">&quot;no-reply@vandelay.com&quot;</span>

<span class="c"># Mailserver configuration</span>
<span class="n">EMAIL_HOST</span> <span class="o">=</span> <span class="s">&quot;mail.vandelay.com&quot;</span>
<span class="n">EMAIL_PORT</span> <span class="o">=</span> <span class="mi">25</span>
<span class="c"># EMAIL_HOST_USER = &quot;servers&quot;</span>
<span class="c"># EMAIL_HOST_PASSWORD = &quot;s3cr3t&quot;</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="events">
<span id="conf-events"></span><h3><a class="toc-backref" href="#id20">Events</a><a class="headerlink" href="#events" title="Permalink to this headline"></a></h3>
<div class="section" id="celery-send-events">
<span id="std:setting-CELERY_SEND_EVENTS"></span><h4>CELERY_SEND_EVENTS<a class="headerlink" href="#celery-send-events" title="Permalink to this headline"></a></h4>
<p>Send events so the worker can be monitored by tools like <cite>celerymon</cite>.</p>
</div>
<div class="section" id="celery-send-task-sent-event">
<span id="std:setting-CELERY_SEND_TASK_SENT_EVENT"></span><h4>CELERY_SEND_TASK_SENT_EVENT<a class="headerlink" href="#celery-send-task-sent-event" title="Permalink to this headline"></a></h4>
<p class="versionadded">
<span class="versionmodified">New in version 2.2.</span></p>
<p>If enabled, a <cite>task-sent</cite> event will be sent for every task so tasks can be
tracked before they are consumed by a worker.</p>
<p>Disabled by default.</p>
</div>
<div class="section" id="celery-event-serializer">
<span id="std:setting-CELERY_EVENT_SERIALIZER"></span><h4>CELERY_EVENT_SERIALIZER<a class="headerlink" href="#celery-event-serializer" title="Permalink to this headline"></a></h4>
<p>Message serialization format used when sending event messages.
Default is <cite>&#8220;json&#8221;</cite>. See <a class="reference internal" href="userguide/executing.html#executing-serializers"><em>Serializers</em></a>.</p>
</div>
</div>
<div class="section" id="broadcast-commands">
<span id="conf-broadcast"></span><h3><a class="toc-backref" href="#id21">Broadcast Commands</a><a class="headerlink" href="#broadcast-commands" title="Permalink to this headline"></a></h3>
<div class="section" id="celery-broadcast-queue">
<span id="std:setting-CELERY_BROADCAST_QUEUE"></span><h4>CELERY_BROADCAST_QUEUE<a class="headerlink" href="#celery-broadcast-queue" title="Permalink to this headline"></a></h4>
<p>Name prefix for the queue used when listening for broadcast messages.
The workers host name will be appended to the prefix to create the final
queue name.</p>
<p>Default is <cite>&#8220;celeryctl&#8221;</cite>.</p>
</div>
<div class="section" id="celery-broadcast-exchange">
<span id="std:setting-CELERY_BROADCAST_EXCHANGE"></span><h4>CELERY_BROADCAST_EXCHANGE<a class="headerlink" href="#celery-broadcast-exchange" title="Permalink to this headline"></a></h4>
<p>Name of the exchange used for broadcast messages.</p>
<p>Default is <cite>&#8220;celeryctl&#8221;</cite>.</p>
</div>
<div class="section" id="celery-broadcast-exchange-type">
<span id="std:setting-CELERY_BROADCAST_EXCHANGE_TYPE"></span><h4>CELERY_BROADCAST_EXCHANGE_TYPE<a class="headerlink" href="#celery-broadcast-exchange-type" title="Permalink to this headline"></a></h4>
<p>Exchange type used for broadcast messages.  Default is <cite>&#8220;fanout&#8221;</cite>.</p>
</div>
</div>
<div class="section" id="logging">
<span id="conf-logging"></span><h3><a class="toc-backref" href="#id22">Logging</a><a class="headerlink" href="#logging" title="Permalink to this headline"></a></h3>
<div class="section" id="celeryd-hijack-root-logger">
<span id="std:setting-CELERYD_HIJACK_ROOT_LOGGER"></span><h4>CELERYD_HIJACK_ROOT_LOGGER<a class="headerlink" href="#celeryd-hijack-root-logger" title="Permalink to this headline"></a></h4>
<p class="versionadded">
<span class="versionmodified">New in version 2.2.</span></p>
<p>By default any previously configured logging options will be reset,
because the Celery programs &#8220;hijacks&#8221; the root logger.</p>
<p>If you want to customize your own logging then you can disable
this behavior.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Logging can also be customized by connecting to the
<tt class="xref std std-signal docutils literal"><span class="pre">celery.signals.setup_logging</span></tt> signal.</p>
</div>
</div>
<div class="section" id="celeryd-log-color">
<span id="std:setting-CELERYD_LOG_COLOR"></span><h4>CELERYD_LOG_COLOR<a class="headerlink" href="#celeryd-log-color" title="Permalink to this headline"></a></h4>
<p>Enables/disables colors in logging output by the Celery apps.</p>
<p>By default colors are enabled if</p>
<blockquote>
<div><ol class="arabic simple">
<li>the app is logging to a real terminal, and not a file.</li>
<li>the app is not running on Windows.</li>
</ol>
</div></blockquote>
</div>
<div class="section" id="celeryd-log-format">
<span id="std:setting-CELERYD_LOG_FORMAT"></span><h4>CELERYD_LOG_FORMAT<a class="headerlink" href="#celeryd-log-format" title="Permalink to this headline"></a></h4>
<p>The format to use for log messages.</p>
<p>Default is <cite>[%(asctime)s: %(levelname)s/%(processName)s] %(message)s</cite></p>
<p>See the Python <a class="reference external" href="http://docs.python.org/library/logging.html#logging" title="(in Python v2.7)"><tt class="xref py py-mod docutils literal"><span class="pre">logging</span></tt></a> module for more information about log
formats.</p>
</div>
<div class="section" id="celeryd-task-log-format">
<span id="std:setting-CELERYD_TASK_LOG_FORMAT"></span><h4>CELERYD_TASK_LOG_FORMAT<a class="headerlink" href="#celeryd-task-log-format" title="Permalink to this headline"></a></h4>
<p>The format to use for log messages logged in tasks.  Can be overridden using
the <em class="xref std std-option">--loglevel</em> option to <a class="reference internal" href="reference/celery.bin.celeryd.html#module-celery.bin.celeryd" title="celery.bin.celeryd"><tt class="xref py py-mod docutils literal"><span class="pre">celeryd</span></tt></a>.</p>
<p>Default is:</p>
<div class="highlight-python"><pre>[%(asctime)s: %(levelname)s/%(processName)s]
    [%(task_name)s(%(task_id)s)] %(message)s</pre>
</div>
<p>See the Python <a class="reference external" href="http://docs.python.org/library/logging.html#logging" title="(in Python v2.7)"><tt class="xref py py-mod docutils literal"><span class="pre">logging</span></tt></a> module for more information about log
formats.</p>
</div>
<div class="section" id="celery-redirect-stdouts">
<span id="std:setting-CELERY_REDIRECT_STDOUTS"></span><h4>CELERY_REDIRECT_STDOUTS<a class="headerlink" href="#celery-redirect-stdouts" title="Permalink to this headline"></a></h4>
<p>If enabled <cite>stdout</cite> and <cite>stderr</cite> will be redirected
to the current logger.</p>
<p>Enabled by default.
Used by <strong class="program">celeryd</strong> and <strong class="program">celerybeat</strong>.</p>
</div>
<div class="section" id="celery-redirect-stdouts-level">
<span id="std:setting-CELERY_REDIRECT_STDOUTS_LEVEL"></span><h4>CELERY_REDIRECT_STDOUTS_LEVEL<a class="headerlink" href="#celery-redirect-stdouts-level" title="Permalink to this headline"></a></h4>
<p>The log level output to <cite>stdout</cite> and <cite>stderr</cite> is logged as.
Can be one of <tt class="xref py py-const docutils literal"><span class="pre">DEBUG</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">INFO</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">WARNING</span></tt>,
<tt class="xref py py-const docutils literal"><span class="pre">ERROR</span></tt> or <tt class="xref py py-const docutils literal"><span class="pre">CRITICAL</span></tt>.</p>
<p>Default is <tt class="xref py py-const docutils literal"><span class="pre">WARNING</span></tt>.</p>
</div>
</div>
<div class="section" id="custom-component-classes-advanced">
<span id="conf-custom-components"></span><h3><a class="toc-backref" href="#id23">Custom Component Classes (advanced)</a><a class="headerlink" href="#custom-component-classes-advanced" title="Permalink to this headline"></a></h3>
<div class="section" id="celeryd-pool">
<span id="std:setting-CELERYD_POOL"></span><h4>CELERYD_POOL<a class="headerlink" href="#celeryd-pool" title="Permalink to this headline"></a></h4>
<p>Name of the pool class used by the worker.</p>
<p>You can use a custom pool class name, or select one of
the built-in aliases: <tt class="docutils literal"><span class="pre">processes</span></tt>, <tt class="docutils literal"><span class="pre">eventlet</span></tt>, <tt class="docutils literal"><span class="pre">gevent</span></tt>.</p>
<p>Default is <tt class="docutils literal"><span class="pre">processes</span></tt>.</p>
</div>
<div class="section" id="celeryd-autoscaler">
<span id="std:setting-CELERYD_AUTOSCALER"></span><h4>CELERYD_AUTOSCALER<a class="headerlink" href="#celeryd-autoscaler" title="Permalink to this headline"></a></h4>
<p class="versionadded">
<span class="versionmodified">New in version 2.2.</span></p>
<p>Name of the autoscaler class to use.</p>
<p>Default is <tt class="docutils literal"><span class="pre">&quot;celery.worker.autoscale.Autoscaler&quot;</span></tt>.</p>
</div>
<div class="section" id="celeryd-consumer">
<span id="std:setting-CELERYD_CONSUMER"></span><h4>CELERYD_CONSUMER<a class="headerlink" href="#celeryd-consumer" title="Permalink to this headline"></a></h4>
<p>Name of the consumer class used by the worker.
Default is <a class="reference internal" href="internals/reference/celery.worker.consumer.html#celery.worker.consumer.Consumer" title="celery.worker.consumer.Consumer"><tt class="xref py py-class docutils literal"><span class="pre">celery.worker.consumer.Consumer</span></tt></a></p>
</div>
<div class="section" id="celeryd-mediator">
<span id="std:setting-CELERYD_MEDIATOR"></span><h4>CELERYD_MEDIATOR<a class="headerlink" href="#celeryd-mediator" title="Permalink to this headline"></a></h4>
<p>Name of the mediator class used by the worker.
Default is <tt class="xref py py-class docutils literal"><span class="pre">celery.worker.controllers.Mediator</span></tt>.</p>
</div>
<div class="section" id="celeryd-eta-scheduler">
<span id="std:setting-CELERYD_ETA_SCHEDULER"></span><h4>CELERYD_ETA_SCHEDULER<a class="headerlink" href="#celeryd-eta-scheduler" title="Permalink to this headline"></a></h4>
<p>Name of the ETA scheduler class used by the worker.
Default is <a class="reference internal" href="internals/reference/celery.utils.timer2.html#celery.utils.timer2.Timer" title="celery.utils.timer2.Timer"><tt class="xref py py-class docutils literal"><span class="pre">celery.utils.timer2.Timer</span></tt></a>, or one overrided
by the pool implementation.</p>
</div>
</div>
<div class="section" id="periodic-task-server-celerybeat">
<span id="conf-celerybeat"></span><h3><a class="toc-backref" href="#id24">Periodic Task Server: celerybeat</a><a class="headerlink" href="#periodic-task-server-celerybeat" title="Permalink to this headline"></a></h3>
<div class="section" id="celerybeat-schedule">
<span id="std:setting-CELERYBEAT_SCHEDULE"></span><h4>CELERYBEAT_SCHEDULE<a class="headerlink" href="#celerybeat-schedule" title="Permalink to this headline"></a></h4>
<p>The periodic task schedule used by <a class="reference internal" href="reference/celery.bin.celerybeat.html#module-celery.bin.celerybeat" title="celery.bin.celerybeat"><tt class="xref py py-mod docutils literal"><span class="pre">celerybeat</span></tt></a>.
See <a class="reference internal" href="userguide/periodic-tasks.html#beat-entries"><em>Entries</em></a>.</p>
</div>
<div class="section" id="celerybeat-scheduler">
<span id="std:setting-CELERYBEAT_SCHEDULER"></span><h4>CELERYBEAT_SCHEDULER<a class="headerlink" href="#celerybeat-scheduler" title="Permalink to this headline"></a></h4>
<p>The default scheduler class.  Default is
<cite>&#8220;celery.beat.PersistentScheduler&#8221;</cite>.</p>
<p>Can also be set via the <em class="xref std std-option">-S</em> argument to
<a class="reference internal" href="reference/celery.bin.celerybeat.html#module-celery.bin.celerybeat" title="celery.bin.celerybeat"><tt class="xref py py-mod docutils literal"><span class="pre">celerybeat</span></tt></a>.</p>
</div>
<div class="section" id="celerybeat-schedule-filename">
<span id="std:setting-CELERYBEAT_SCHEDULE_FILENAME"></span><h4>CELERYBEAT_SCHEDULE_FILENAME<a class="headerlink" href="#celerybeat-schedule-filename" title="Permalink to this headline"></a></h4>
<p>Name of the file used by <cite>PersistentScheduler</cite> to store the last run times
of periodic tasks.  Can be a relative or absolute path, but be aware that the
suffix <cite>.db</cite> may be appended to the file name (depending on Python version).</p>
<p>Can also be set via the <em class="xref std std-option">--schedule</em> argument to
<a class="reference internal" href="reference/celery.bin.celerybeat.html#module-celery.bin.celerybeat" title="celery.bin.celerybeat"><tt class="xref py py-mod docutils literal"><span class="pre">celerybeat</span></tt></a>.</p>
</div>
<div class="section" id="celerybeat-max-loop-interval">
<span id="std:setting-CELERYBEAT_MAX_LOOP_INTERVAL"></span><h4>CELERYBEAT_MAX_LOOP_INTERVAL<a class="headerlink" href="#celerybeat-max-loop-interval" title="Permalink to this headline"></a></h4>
<p>The maximum number of seconds <a class="reference internal" href="reference/celery.bin.celerybeat.html#module-celery.bin.celerybeat" title="celery.bin.celerybeat"><tt class="xref py py-mod docutils literal"><span class="pre">celerybeat</span></tt></a> can sleep
between checking the schedule.  Default is 300 seconds (5 minutes).</p>
</div>
</div>
<div class="section" id="monitor-server-celerymon">
<span id="conf-celerymon"></span><h3><a class="toc-backref" href="#id25">Monitor Server: celerymon</a><a class="headerlink" href="#monitor-server-celerymon" title="Permalink to this headline"></a></h3>
<div class="section" id="celerymon-log-format">
<span id="std:setting-CELERYMON_LOG_FORMAT"></span><h4>CELERYMON_LOG_FORMAT<a class="headerlink" href="#celerymon-log-format" title="Permalink to this headline"></a></h4>
<p>The format to use for log messages.</p>
<p>Default is <cite>[%(asctime)s: %(levelname)s/%(processName)s] %(message)s</cite></p>
<p>See the Python <a class="reference external" href="http://docs.python.org/library/logging.html#logging" title="(in Python v2.7)"><tt class="xref py py-mod docutils literal"><span class="pre">logging</span></tt></a> module for more information about log
formats.</p>
</div>
</div>
<div class="section" id="deprecated-settings">
<span id="conf-deprecated"></span><h3><a class="toc-backref" href="#id26">Deprecated Settings</a><a class="headerlink" href="#deprecated-settings" title="Permalink to this headline"></a></h3>
<p>These settings have been deprecated and should no longer used,
as they will be removed in future versions.</p>
<div class="section" id="celery-amqp-task-result-expires">
<span id="std:setting-CELERY_AMQP_TASK_RESULT_EXPIRES"></span><h4>CELERY_AMQP_TASK_RESULT_EXPIRES<a class="headerlink" href="#celery-amqp-task-result-expires" title="Permalink to this headline"></a></h4>
<p class="deprecated">
<span class="versionmodified">Deprecated since version 2.5.</span></p>
<p>The time in seconds of which the task result queues should expire.</p>
<p>This setting is deprecated, and will be removed in version 3.0.
Please use <a class="reference internal" href="#std:setting-CELERY_TASK_RESULT_EXPIRES"><tt class="xref std std-setting docutils literal"><span class="pre">CELERY_TASK_RESULT_EXPIRES</span></tt></a> instead.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">AMQP result expiration requires RabbitMQ versions 2.1.0 and higher.</p>
</div>
</div>
<div class="section" id="celery-task-error-whitelist">
<span id="std:setting-CELERY_TASK_ERROR_WHITELIST"></span><h4>CELERY_TASK_ERROR_WHITELIST<a class="headerlink" href="#celery-task-error-whitelist" title="Permalink to this headline"></a></h4>
<p class="deprecated">
<span class="versionmodified">Deprecated since version 2.5.</span></p>
<p>A white list of exceptions to send error emails for.</p>
<p>This option is pending deprecation and is scheduled for removal
in version 3.0.</p>
</div>
<div class="section" id="celeryd-log-file">
<span id="std:setting-CELERYD_LOG_FILE"></span><h4>CELERYD_LOG_FILE<a class="headerlink" href="#celeryd-log-file" title="Permalink to this headline"></a></h4>
<p class="deprecated">
<span class="versionmodified">Deprecated since version 2.4.</span></p>
<p>This option is deprecated and is scheduled for removal in version 3.0.
Please use the <em class="xref std std-option">--logfile</em> argument instead.</p>
<p>The default file name the worker daemon logs messages to.  Can be overridden
using the <em class="xref std std-option">--logfile</em> option to <a class="reference internal" href="reference/celery.bin.celeryd.html#module-celery.bin.celeryd" title="celery.bin.celeryd"><tt class="xref py py-mod docutils literal"><span class="pre">celeryd</span></tt></a>.</p>
<p>The default is <tt class="xref py py-const xref docutils literal"><span class="pre">None</span></tt> (<cite>stderr</cite>)</p>
</div>
<div class="section" id="celeryd-log-level">
<span id="std:setting-CELERYD_LOG_LEVEL"></span><h4>CELERYD_LOG_LEVEL<a class="headerlink" href="#celeryd-log-level" title="Permalink to this headline"></a></h4>
<p class="deprecated">
<span class="versionmodified">Deprecated since version 2.4.</span></p>
<p>This option is deprecated and is scheduled for removal in version 3.0.
Please use the <em class="xref std std-option">--loglevel</em> argument instead.</p>
<p>Worker log level, can be one of <tt class="xref py py-const docutils literal"><span class="pre">DEBUG</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">INFO</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">WARNING</span></tt>,
<tt class="xref py py-const docutils literal"><span class="pre">ERROR</span></tt> or <tt class="xref py py-const docutils literal"><span class="pre">CRITICAL</span></tt>.</p>
<p>Can also be set via the <em class="xref std std-option">--loglevel</em> argument to
<a class="reference internal" href="reference/celery.bin.celeryd.html#module-celery.bin.celeryd" title="celery.bin.celeryd"><tt class="xref py py-mod docutils literal"><span class="pre">celeryd</span></tt></a>.</p>
<p>See the <a class="reference external" href="http://docs.python.org/library/logging.html#logging" title="(in Python v2.7)"><tt class="xref py py-mod docutils literal"><span class="pre">logging</span></tt></a> module for more information.</p>
</div>
<div class="section" id="celerybeat-log-file">
<span id="std:setting-CELERYBEAT_LOG_FILE"></span><h4>CELERYBEAT_LOG_FILE<a class="headerlink" href="#celerybeat-log-file" title="Permalink to this headline"></a></h4>
<p class="deprecated">
<span class="versionmodified">Deprecated since version 2.4.</span></p>
<p>This option is deprecated and is scheduled for removal in version 3.0.
Please use the <em class="xref std std-option">--logfile</em> argument instead.</p>
<p>The default file name to log messages to.  Can be overridden using
the <cite>&#8211;logfile</cite> option to <a class="reference internal" href="reference/celery.bin.celerybeat.html#module-celery.bin.celerybeat" title="celery.bin.celerybeat"><tt class="xref py py-mod docutils literal"><span class="pre">celerybeat</span></tt></a>.</p>
<p>The default is <tt class="xref py py-const xref docutils literal"><span class="pre">None</span></tt> (<cite>stderr</cite>).</p>
</div>
<div class="section" id="celerybeat-log-level">
<span id="std:setting-CELERYBEAT_LOG_LEVEL"></span><h4>CELERYBEAT_LOG_LEVEL<a class="headerlink" href="#celerybeat-log-level" title="Permalink to this headline"></a></h4>
<p class="deprecated">
<span class="versionmodified">Deprecated since version 2.4.</span></p>
<p>This option is deprecated and is scheduled for removal in version 3.0.
Please use the <em class="xref std std-option">--loglevel</em> argument instead.</p>
<p>Logging level. Can be any of <tt class="xref py py-const docutils literal"><span class="pre">DEBUG</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">INFO</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">WARNING</span></tt>,
<tt class="xref py py-const docutils literal"><span class="pre">ERROR</span></tt>, or <tt class="xref py py-const docutils literal"><span class="pre">CRITICAL</span></tt>.</p>
<p>Can also be set via the <em class="xref std std-option">--loglevel</em> argument to
<a class="reference internal" href="reference/celery.bin.celerybeat.html#module-celery.bin.celerybeat" title="celery.bin.celerybeat"><tt class="xref py py-mod docutils literal"><span class="pre">celerybeat</span></tt></a>.</p>
<p>See the <a class="reference external" href="http://docs.python.org/library/logging.html#logging" title="(in Python v2.7)"><tt class="xref py py-mod docutils literal"><span class="pre">logging</span></tt></a> module for more information.</p>
</div>
<div class="section" id="celerymon-log-file">
<span id="std:setting-CELERYMON_LOG_FILE"></span><h4>CELERYMON_LOG_FILE<a class="headerlink" href="#celerymon-log-file" title="Permalink to this headline"></a></h4>
<p class="deprecated">
<span class="versionmodified">Deprecated since version 2.4.</span></p>
<p>This option is deprecated and is scheduled for removal in version 3.0.
Please use the <em class="xref std std-option">--logfile</em> argument instead.</p>
<p>The default file name to log messages to.  Can be overridden using
the <em class="xref std std-option">--logfile</em> argument to <cite>celerymon</cite>.</p>
<p>The default is <tt class="xref py py-const xref docutils literal"><span class="pre">None</span></tt> (<cite>stderr</cite>)</p>
</div>
<div class="section" id="celerymon-log-level">
<span id="std:setting-CELERYMON_LOG_LEVEL"></span><h4>CELERYMON_LOG_LEVEL<a class="headerlink" href="#celerymon-log-level" title="Permalink to this headline"></a></h4>
<p class="deprecated">
<span class="versionmodified">Deprecated since version 2.4.</span></p>
<p>This option is deprecated and is scheduled for removal in version 3.0.
Please use the <em class="xref std std-option">--loglevel</em> argument instead.</p>
<p>Logging level. Can be any of <tt class="xref py py-const docutils literal"><span class="pre">DEBUG</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">INFO</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">WARNING</span></tt>,
<tt class="xref py py-const docutils literal"><span class="pre">ERROR</span></tt>, or <tt class="xref py py-const docutils literal"><span class="pre">CRITICAL</span></tt>.</p>
<p>See the <a class="reference external" href="http://docs.python.org/library/logging.html#logging" title="(in Python v2.7)"><tt class="xref py py-mod docutils literal"><span class="pre">logging</span></tt></a> module for more information.</p>
</div>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper"><p class="logo"><a href="index.html">
  <img class="logo" src="http://cloud.github.com/downloads/ask/celery/celery_128.png" alt="Logo"/>
</a></p>
  <h4>Previous topic</h4>
  <p class="topless"><a href="userguide/signals.html"
                        title="previous chapter">Signals</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="cookbook/index.html"
                        title="next chapter">Cookbook</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/configuration.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="cookbook/index.html" title="Cookbook"
             >next</a> |</li>
        <li class="right" >
          <a href="userguide/signals.html" title="Signals"
             >previous</a> |</li>
        <li><a href="index.html">Celery v2.4.6 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2009-2011, Ask Solem &amp; Contributors.
    </div>
  </body>
</html>