Flask Documentation (1.1.x)
route('/hello') def hello(): return 'Hello, World' You can do more! You can make parts of the URL dynamic and attach multiple rules to a function. Variable Rules You can add variable sections to a URL ietf.org/rfc/rfc2068.txt]. Likewise, OPTIONS is automatically implemented for you. Static Files Dynamic web applications also need static files. That’s usually where the CSS and JavaScript files are coming inside the flaskr package. Templates are files that contain static data as well as placeholders for dynamic data. A template is rendered with specific data to produce a final document. Flask uses the Jinja0 码力 | 428 页 | 895.98 KB | 1 年前3Flask Documentation (1.1.x)
previous page) def hello(): return 'Hello, World' You can do more! You can make parts of the URL dynamic and attach multiple rules to a function. Variable Rules You can add variable sections to a URL according to the HTTP RFC. Likewise, OPTIONS is automatically implemented for you. 1.4.5 Static Files Dynamic web applications also need static files. That’s usually where the CSS and JavaScript files are coming (1.1.x), Release 1.1.4 Templates are files that contain static data as well as placeholders for dynamic data. A template is rendered with specific data to produce a final document. Flask uses the Jinja0 码力 | 291 页 | 1.25 MB | 1 年前3Celery v5.0.1 Documentation
configuration files, this is how you’d route a misbehaving task to a dedicated queue: celeryconfig.py: task_routes = { 'tasks.add': 'low-priority', } Or instead of routing it you could rate limit the task instead are sent to named queues. The task_routes setting enables you to route tasks by name and keep everything centralized in one location: app.conf.update( task_routes = { 'proj.tasks.add': {'queue': Hard-coding queue names in code isn’t recommended, the best practice is to use configuration routers (task_routes). To find out more about routing, please see Routing Tasks. Results options You can enable or0 码力 | 2313 页 | 2.13 MB | 1 年前3Celery v5.0.2 Documentation
configuration files, this is how you’d route a misbehaving task to a dedicated queue: celeryconfig.py: task_routes = { 'tasks.add': 'low-priority', } Or instead of routing it you could rate limit the task instead are sent to named queues. The task_routes setting enables you to route tasks by name and keep everything centralized in one location: app.conf.update( task_routes = { 'proj.tasks.add': {'queue': Hard-coding queue names in code isn’t recommended, the best practice is to use configuration routers (task_routes). To find out more about routing, please see Routing Tasks. Results options You can enable or0 码力 | 2313 页 | 2.14 MB | 1 年前3Celery v5.0.0 Documentation
configuration files, this is how you’d route a misbehaving task to a dedicated queue: celeryconfig.py: task_routes = { 'tasks.add': 'low-priority', } Or instead of routing it you could rate limit the task instead are sent to named queues. The task_routes setting enables you to route tasks by name and keep everything centralized in one location: app.conf.update( task_routes = { 'proj.tasks.add': {'queue': Hard-coding queue names in code isn’t recommended, the best practice is to use configuration routers (task_routes). To find out more about routing, please see Routing Tasks. Results options You can enable or0 码力 | 2309 页 | 2.13 MB | 1 年前3Celery v5.0.5 Documentation
configuration files, this is how you’d route a misbehaving task to a dedicated queue: celeryconfig.py: task_routes = { 'tasks.add': 'low-priority', } Or instead of routing it you could rate limit the task instead are sent to named queues. The task_routes setting enables you to route tasks by name and keep everything centralized in one location: app.conf.update( task_routes = { 'proj.tasks.add': {'queue': Hard-coding queue names in code isn’t recommended, the best practice is to use configuration routers (task_routes). To find out more about routing, please see Routing Tasks. Results options You can enable or0 码力 | 2315 页 | 2.14 MB | 1 年前3Celery 2.0 Documentation
and one server z, that only handles feed related tasks. You can use this configuration: CELERY_ROUTES = {"feed.tasks.import_feed": {"queue": "feeds"}} With this route enabled import feed tasks will settings. To route a task to the feed_tasks queue, you can add an entry in the CELERY_ROUTES setting: CELERY_ROUTES = { "feeds.tasks.import_feed": { "queue": "feed_tasks", material. Exchanges, queues and routing keys. 1. Messages are sent to exchanges. 2. An exchange routes messages to one or more queues. Several exchange types exists, providing different ways to do routing0 码力 | 284 页 | 332.71 KB | 1 年前3Celery 2.0 Documentation
and one server z, that only handles feed related tasks. You can use this configuration: CELERY_ROUTES = {"feed.tasks.import_feed": {"queue": "feeds"}} With this route enabled import feed tasks will settings. To route a task to the feed_tasks queue, you can add an entry in the CELERY_ROUTES setting: CELERY_ROUTES = { "feeds.tasks.import_feed": { "queue": "feed_tasks", "routing_key": "feed.import" material. Exchanges, queues and routing keys. 1. Messages are sent to exchanges. 2. An exchange routes messages to one or more queues. Several exchange types exists, providing different ways to do routing0 码力 | 165 页 | 492.43 KB | 1 年前3Celery 2.1 Documentation
and one server z, that only handles feed related tasks. You can use this configuration: CELERY_ROUTES = {"feed.tasks.import_feed": {"queue": "feeds"}} With this route enabled import feed tasks will settings. To route a task to the feed_tasks queue, you can add an entry in the CELERY_ROUTES setting: CELERY_ROUTES = { "feeds.tasks.import_feed": { "queue": "feed_tasks", material. Exchanges, queues and routing keys. 1. Messages are sent to exchanges. 2. An exchange routes messages to one or more queues. Several exchange types exists, providing different ways to do routing0 码力 | 463 页 | 861.69 KB | 1 年前3Celery v4.0.1 Documentation
configuration files, this is how you’d route a misbehaving task to a dedicated queue: celeryconfig.py: task_routes = { 'tasks.add': 'low-priority', } Or instead of routing it you could rate limit the task instead are sent to named queues. The task_routes setting enables you to route tasks by name and keep everything centralized in one location: app.conf.update( task_routes = { 'proj.tasks.add': {'queue': Hard-coding queue names in code isn’t recommended, the best practice is to use configuration routers (task_routes). To find out more about routing, please see Routing Tasks. Advanced Options These options are0 码力 | 1040 页 | 1.37 MB | 1 年前3
共 360 条
- 1
- 2
- 3
- 4
- 5
- 6
- 36