- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 84 for task (0.2 sec)
-
docs/pt/docs/tutorial/background-tasks.md
```Python hl_lines="6-9" {!../../../docs_src/background_tasks/tutorial001.py!} ``` ## Adicionar a tarefa em segundo plano Dentro de sua _função de operação de caminho_, passe sua função de tarefa para o objeto _tarefas em segundo plano_ com o método `.add_task()`: ```Python hl_lines="14" {!../../../docs_src/background_tasks/tutorial001.py!} ``` `.add_task()` recebe como argumentos:
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Mon May 09 23:44:32 GMT 2022 - 5.3K bytes - Viewed (0) -
docs/de/docs/tutorial/background-tasks.md
```Python hl_lines="6-9" {!../../../docs_src/background_tasks/tutorial001.py!} ``` ## Den Hintergrundtask hinzufügen Übergeben Sie innerhalb Ihrer *Pfadoperation-Funktion* Ihre Taskfunktion mit der Methode `.add_task()` an das *Hintergrundtasks*-Objekt: ```Python hl_lines="14" {!../../../docs_src/background_tasks/tutorial001.py!} ``` `.add_task()` erhält als Argumente:
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jan 12 14:15:29 GMT 2024 - 6.4K bytes - Viewed (0) -
docs_src/background_tasks/tutorial002_py310.py
log.write(message) def get_query(background_tasks: BackgroundTasks, q: str | None = None): if q: message = f"found query: {q}\n" background_tasks.add_task(write_log, message) return q @app.post("/send-notification/{email}") async def send_notification( email: str, background_tasks: BackgroundTasks, q: str = Depends(get_query) ): message = f"message to {email}\n"
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 643 bytes - Viewed (0) -
docs/ko/docs/tutorial/background-tasks.md
그리고 이 작업은 `async`와 `await`를 사용하지 않으므로 일반 `def` 함수로 선언합니다. ```Python hl_lines="6-9" {!../../../docs_src/background_tasks/tutorial001.py!} ``` ## 백그라운드 작업 추가 _경로 작동 함수_ 내에서 작업 함수를 `.add_task()` 함수 통해 _백그라운드 작업_ 개체에 전달합니다. ```Python hl_lines="14" {!../../../docs_src/background_tasks/tutorial001.py!} ``` `.add_task()` 함수는 다음과 같은 인자를 받습니다 : - 백그라운드에서 실행되는 작업 함수 (`write_notification`). - 작업 함수에 순서대로 전달되어야 하는 일련의 인자 (`email`).
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sun Feb 11 13:48:31 GMT 2024 - 5.7K bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/dependencies-with-yield.md
operation ->> client: Return response to client Note over client,operation: Response is already sent, can't change it anymore opt Tasks operation -->> tasks: Send background tasks end opt Raise other exception tasks -->> tasks: Handle exceptions in the background task code end ``` !!! info
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Feb 24 23:06:37 GMT 2024 - 14.1K bytes - Viewed (0) -
docs_src/background_tasks/tutorial002_an_py310.py
log.write(message) def get_query(background_tasks: BackgroundTasks, q: str | None = None): if q: message = f"found query: {q}\n" background_tasks.add_task(write_log, message) return q @app.post("/send-notification/{email}") async def send_notification( email: str, background_tasks: BackgroundTasks, q: Annotated[str, Depends(get_query)] ):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 683 bytes - Viewed (1) -
docs/de/docs/advanced/async-tests.md
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 30 20:25:57 GMT 2024 - 4.4K bytes - Viewed (0) -
docs/em/docs/advanced/async-tests.md
🔬 🔢 🔜 🔁, 👆 💪 🔜 🤙 (& `await`) 🎏 `async` 🔢 ↖️ ⚪️➡️ 📨 📨 👆 FastAPI 🈸 👆 💯, ⚫️❔ 👆 🔜 🤙 👫 🙆 🙆 👆 📟. !!! tip
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Apr 01 09:26:04 GMT 2023 - 3K bytes - Viewed (0) -
tests/test_tutorial/test_response_change_status_code/test_tutorial001.py
client = TestClient(app) def test_path_operation(): response = client.put("/get-or-create-task/foo") print(response.content) assert response.status_code == 200, response.text assert response.json() == "Listen to the Bar Fighters" response = client.put("/get-or-create-task/bar") assert response.status_code == 201, response.text
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Jul 09 18:06:12 GMT 2020 - 521 bytes - Viewed (0) -
docs/ja/docs/tutorial/background-tasks.md
```Python hl_lines="6-9" {!../../../docs_src/background_tasks/tutorial001.py!} ``` ## バックグラウンドタスクの追加 *path operations 関数* 内で、`.add_task()` メソッドを使用してタスク関数を *background tasks* オブジェクトに渡します。 ```Python hl_lines="14" {!../../../docs_src/background_tasks/tutorial001.py!} ``` `.add_task()` は以下の引数を受け取ります: * バックグラウンドで実行されるタスク関数 (`write_notification`)。 * タスク関数に順番に渡す必要のある引数の列 (`email`)。
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Mon Jan 15 16:12:39 GMT 2024 - 6.1K bytes - Viewed (0)