Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 355 for Background (0.38 seconds)

  1. docs/en/docs/tutorial/background-tasks.md

    ## Add the background task { #add-the-background-task }
    
    Inside of your *path operation function*, pass your task function to the *background tasks* object with the method `.add_task()`:
    
    {* ../../docs_src/background_tasks/tutorial001_py310.py hl[14] *}
    
    `.add_task()` receives as arguments:
    
    * A task function to be run in the background (`write_notification`).
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 4.7K bytes
    - Click Count (0)
  2. docs/zh-hant/docs/tutorial/background-tasks.md

    如果請求中有查詢參數,會以背景任務寫入日誌。
    
    接著,在路徑操作函式中建立的另一個背景任務會使用 `email` 路徑參數寫入訊息。
    
    ## 技術細節 { #technical-details }
    
    類別 `BackgroundTasks` 直接來自 [`starlette.background`](https://www.starlette.dev/background/)。
    
    它被直接匯入/包含到 FastAPI 中,因此你可以從 `fastapi` 匯入它,並避免不小心從 `starlette.background` 匯入另一個同名的 `BackgroundTask`(結尾沒有 s)。
    
    只使用 `BackgroundTasks`(而非 `BackgroundTask`)時,你就能把它當作路徑操作函式的參數,並讓 **FastAPI** 幫你處理其餘部分,就像直接使用 `Request` 物件一樣。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 4.1K bytes
    - Click Count (0)
  3. docs/ja/docs/tutorial/background-tasks.md

    そして、*path operation function* で生成された別のバックグラウンドタスクは、`email` パスパラメータを使用してメッセージを書き込みます。
    
    ## 技術的な詳細 { #technical-details }
    
    `BackgroundTasks` クラスは、[`starlette.background`](https://www.starlette.dev/background/) から直接取得されます。
    
    これは、FastAPI に直接インポート/インクルードされるため、`fastapi` からインポートできる上に、`starlette.background`から別の `BackgroundTask` (末尾に `s` がない) を誤ってインポートすることを回避できます。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 5.8K bytes
    - Click Count (0)
  4. docs/zh/docs/tutorial/background-tasks.md

    如果请求中有查询,它将在后台任务中写入日志。
    
    然后另一个在 *路径操作函数* 生成的后台任务会使用路径参数 `email` 写入一条信息。
    
    ## 技术细节 { #technical-details }
    
    `BackgroundTasks` 类直接来自 [`starlette.background`](https://www.starlette.dev/background/)。
    
    它被直接导入/包含到FastAPI以便你可以从 `fastapi` 导入,并避免意外从 `starlette.background` 导入备用的 `BackgroundTask` (后面没有 `s`)。
    
    通过仅使用 `BackgroundTasks` (而不是 `BackgroundTask`),使得能将它作为 *路径操作函数* 的参数 ,并让**FastAPI**为您处理其余部分, 就像直接使用 `Request` 对象。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 4.1K bytes
    - Click Count (0)
  5. cmd/background-heal-ops.go

    	maxIO, maxWait, _ := globalHealConfig.Clone()
    	waitForLowIO(maxIO, maxWait, currentHTTPIO)
    }
    
    func initBackgroundHealing(ctx context.Context, objAPI ObjectLayer) {
    	bgSeq := newBgHealSequence()
    	// Run the background healer
    	for range globalBackgroundHealRoutine.workers {
    		go globalBackgroundHealRoutine.AddWorker(ctx, objAPI, bgSeq)
    	}
    
    	globalBackgroundHealState.LaunchNewHealSequence(bgSeq, objAPI)
    }
    
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Tue May 27 15:19:03 GMT 2025
    - 4.6K bytes
    - Click Count (0)
  6. cmd/background-newdisks-heal-ops.go

    	}
    }
    
    func initAutoHeal(ctx context.Context, objAPI ObjectLayer) {
    	z, ok := objAPI.(*erasureServerPools)
    	if !ok {
    		return
    	}
    
    	initBackgroundHealing(ctx, objAPI) // start quick background healing
    	if env.Get("_MINIO_AUTO_DRIVE_HEALING", config.EnableOn) == config.EnableOn {
    		globalBackgroundHealState.pushHealLocalDisks(getLocalDisksToHeal()...)
    		go monitorLocalDisksAndHeal(ctx, z)
    	}
    
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Fri Aug 29 02:39:48 GMT 2025
    - 16.5K bytes
    - Click Count (0)
  7. cmd/background-newdisks-heal-ops_gen.go

    Klaus Post <******@****.***> 1759093161 +0200
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Sun Sep 28 20:59:21 GMT 2025
    - 24.6K bytes
    - Click Count (0)
  8. cmd/background-newdisks-heal-ops_gen_test.go

    Klaus Post <******@****.***> 1759093161 +0200
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Sun Sep 28 20:59:21 GMT 2025
    - 2.3K bytes
    - Click Count (0)
  9. fastapi/background.py

    from annotated_doc import Doc
    from starlette.background import BackgroundTasks as StarletteBackgroundTasks
    from typing_extensions import ParamSpec
    
    P = ParamSpec("P")
    
    
    class BackgroundTasks(StarletteBackgroundTasks):
        """
        A collection of background tasks that will be called after a response has been
        sent to the client.
    
        Read more about it in the
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Feb 11 18:41:21 GMT 2026
    - 1.8K bytes
    - Click Count (0)
  10. docs/en/docs/reference/background.md

    # Background Tasks - `BackgroundTasks`
    
    You can declare a parameter in a *path operation function* or dependency function with the type `BackgroundTasks`, and then you can use it to schedule the execution of background tasks after the response is sent.
    
    You can import it directly from `fastapi`:
    
    ```python
    from fastapi import BackgroundTasks
    ```
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 377 bytes
    - Click Count (0)
Back to Top