Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 248 for shutdown (0.21 sec)

  1. docs/em/docs/advanced/events.md

    👆 💪 🚮 🌅 🌘 1️⃣ 🎉 🐕‍🦺 🔢.
    
    & 👆 🈸 🏆 🚫 ▶️ 📨 📨 ⏭ 🌐 `startup` 🎉 🐕‍🦺 ✔️ 🏁.
    
    ### `shutdown` 🎉
    
    🚮 🔢 👈 🔜 🏃 🕐❔ 🈸 🤫 🔽, 📣 ⚫️ ⏮️ 🎉 `"shutdown"`:
    
    ```Python hl_lines="6"
    {!../../../docs_src/events/tutorial002.py!}
    ```
    
    📥, `shutdown` 🎉 🐕‍🦺 🔢 🔜 ✍ ✍ ⏸ `"Application shutdown"` 📁 `log.txt`.
    
    !!! info
         `open()` 🔢, `mode="a"` ⛓ "🎻",, ⏸ 🔜 🚮 ⏮️ ⚫️❔ 🔛 👈 📁, 🍵 📁 ⏮️ 🎚.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  2. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

      @Test
      fun shutdownWithoutStart() {
        val server = MockWebServer()
        server.shutdown()
      }
    
      @Test
      fun closeViaClosable() {
        val server: Closeable = MockWebServer()
        server.close()
      }
    
      @Test
      fun shutdownWithoutEnqueue() {
        val server = MockWebServer()
        server.start()
        server.shutdown()
      }
    
      @Test
      fun portImplicitlyStarts() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.9K bytes
    - Viewed (0)
  3. docs_src/events/tutorial002.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.on_event("shutdown")
    def shutdown_event():
        with open("log.txt", mode="a") as log:
            log.write("Application shutdown")
    
    
    @app.get("/items/")
    async def read_items():
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 255 bytes
    - Viewed (0)
  4. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

        server2.start()
        server2.start()
        server2.shutdown()
      }
    
      @Test
      fun shutdownTwice() {
        val server2 = MockWebServer()
        server2.start()
        server2.shutdown()
        try {
          server2.start()
          fail<Unit>()
        } catch (expected: IllegalStateException) {
          // Expected.
        }
        server2.shutdown()
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  5. internal/event/target/nats_contrib_test.go

    	natsserver "github.com/nats-io/nats-server/v2/test"
    )
    
    func TestNatsConnPlain(t *testing.T) {
    	opts := natsserver.DefaultTestOptions
    	opts.Port = 14222
    	s := natsserver.RunServer(&opts)
    	defer s.Shutdown()
    
    	clientConfig := &NATSArgs{
    		Enable: true,
    		Address: xnet.Host{
    			Name:      "localhost",
    			Port:      (xnet.Port(opts.Port)),
    			IsPortSet: true,
    		},
    		Subject: "test",
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 04 19:57:37 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  6. mockwebserver/src/main/kotlin/mockwebserver3/SocketPolicy.kt

      object FailHandshake : SocketPolicy
    
      /**
       * Shutdown the socket input after sending the response. For testing bad behavior.
       *
       * See [SocketPolicy] for reasons why this can cause test flakiness and how to avoid it.
       */
      object ShutdownInputAtEnd : SocketPolicy
    
      /**
       * Shutdown the socket output after sending the response. For testing bad behavior.
       *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  7. docs_src/async_sql_databases/tutorial001.py

    class Note(BaseModel):
        id: int
        text: str
        completed: bool
    
    
    app = FastAPI()
    
    
    @app.on_event("startup")
    async def startup():
        await database.connect()
    
    
    @app.on_event("shutdown")
    async def shutdown():
        await database.disconnect()
    
    
    @app.get("/notes/", response_model=List[Note])
    async def read_notes():
        query = notes.select()
        return await database.fetch_all(query)
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 1.4K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/AbstractListeningExecutorServiceTest.java

      /** Simple same thread listening executor service that doesn't handle shutdown. */
      private static class TestListeningExecutorService extends AbstractListeningExecutorService {
    
        @Override
        public void execute(Runnable runnable) {
          assertThat(runnable).isInstanceOf(TrustedListenableFutureTask.class);
          runnable.run();
        }
    
        @Override
        public void shutdown() {}
    
        @Override
        public List<Runnable> shutdownNow() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.2K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/AbstractExecutionThreadServiceTest.java

          enterRun.countDown();
          try {
            exitRun.await();
          } catch (InterruptedException e) {
            throw new RuntimeException(e);
          }
        }
    
        @Override
        protected void shutDown() {
          assertTrue(startUpCalled);
          assertTrue(runCalled);
          assertFalse(shutDownCalled);
          shutDownCalled = true;
          assertEquals(expectedShutdownState, state());
        }
    
        @Override
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 12.7K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/util/concurrent/AbstractService.java

       */
      @ForOverride
      protected abstract void doStart();
    
      /**
       * This method should be used to initiate service shutdown. The invocation of this method should
       * cause a call to {@link #notifyStopped()}, either during this method's run, or after it has
       * returned. If shutdown fails, the invocation should cause a call to {@link
       * #notifyFailed(Throwable)} instead.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri May 12 18:32:03 GMT 2023
    - 20.4K bytes
    - Viewed (0)
Back to top