- Sort Score
- Result 10 results
- Languages All
Results 231 - 240 of 1,167 for Rewrite (0.05 sec)
-
docs/en/docs/tutorial/background-tasks.md
It is just a standard function that can receive parameters. It can be an `async def` or normal `def` function, **FastAPI** will know how to handle it correctly. In this case, the task function will write to a file (simulating sending an email). And as the write operation doesn't use `async` and `await`, we define the function with normal `def`: {* ../../docs_src/background_tasks/tutorial001.py hl[6:9] *} ## Add the background task
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 15:22:48 UTC 2024 - 4.8K bytes - Viewed (0) -
internal/lock/lock_solaris.go
Err: syscall.EISDIR, } } return &LockedFile{f}, nil } // TryLockedOpenFile - tries a new write lock, functionality // it is similar to LockedOpenFile with with syscall.LOCK_EX // mode but along with syscall.LOCK_NB such that the function // doesn't wait forever but instead returns if it cannot // acquire a write lock. func TryLockedOpenFile(path string, flag int, perm os.FileMode) (*LockedFile, error) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Jan 02 17:15:06 UTC 2022 - 2.8K bytes - Viewed (0) -
guava/src/com/google/common/cache/CacheBuilder.java
* segments, each governed by its own write lock. The segment lock is taken once for each explicit * write, and twice for each cache loading computation (once prior to loading the new value, and * once after loading completes). Much internal cache management is performed at the segment * granularity. For example, access queues and write queues are kept per segment when they are
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 51.6K bytes - Viewed (0) -
docs_src/background_tasks/tutorial002_an_py310.py
from typing import Annotated from fastapi import BackgroundTasks, Depends, FastAPI app = FastAPI() def write_log(message: str): with open("log.txt", mode="a") as log: 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
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 683 bytes - Viewed (0) -
api/go1.20.txt
pkg net/http/httputil, type ProxyRequest struct, In *http.Request #53002 pkg net/http/httputil, type ProxyRequest struct, Out *http.Request #53002 pkg net/http/httputil, type ReverseProxy struct, Rewrite func(*ProxyRequest) #53002 pkg net/http, method (*ResponseController) Flush() error #54136 pkg net/http, method (*ResponseController) Hijack() (net.Conn, *bufio.ReadWriter, error) #54136
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Feb 17 21:23:32 UTC 2023 - 602.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/AbstractByteHasherTest.java
private final ByteArrayOutputStream out = new ByteArrayOutputStream(); @Override protected void update(byte b) { out.write(b); } @Override protected void update(byte[] b, int off, int len) { out.write(b, off, len); } byte[] bytes() { return out.toByteArray(); } void assertBytes(byte[] expected) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 3.8K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/BasicDerAdapter.kt
writer: DerWriter, value: T, ) { if (typeHint) { writer.typeHint = value } if (isOptional && value == defaultValue) { // Nothing to write! return } writer.write(name, tagClass, tag) { codec.encode(writer, value) } } /** * Returns a copy with a context tag. This should be used when the type is ambiguous on its own.
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.4K bytes - Viewed (0) -
.github/workflows/stale-issues.yml
permissions: contents: read jobs: close-issues: # Don't do this in forks if: github.repository == 'tensorflow/tensorflow' runs-on: ubuntu-latest permissions: issues: write pull-requests: write steps: - name: Awaiting response issues uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0 with:
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Wed Jun 26 15:41:19 UTC 2024 - 4.1K bytes - Viewed (0) -
cmd/namespace-lock.go
delete(n.lockMap, resource) } } // dsync's distributed lock instance. type distLockInstance struct { rwMutex *dsync.DRWMutex opsID string } // Lock - block until write lock is taken or timeout has occurred. func (di *distLockInstance) GetLock(ctx context.Context, timeout *dynamicTimeout) (LockContext, error) { lockSource := getSource(2) start := UTCNow()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Sep 29 22:40:36 UTC 2024 - 9.2K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/admin/design/AdminDesignAction.java
} try { write(uploadFile.getAbsolutePath(), form.designFile.getFileData()); final String currentFileName = fileName; saveInfo(messages -> messages.addSuccessUploadDesignFile(GLOBAL, currentFileName)); } catch (final Exception e) { logger.error("Failed to write an image file: {}", fileName, e);
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Fri Oct 11 21:11:58 UTC 2024 - 16.1K bytes - Viewed (0)