Search Options

Results per page
Sort
Preferred Languages
Advance

Results 341 - 350 of 653 for nbsend (0.1 sec)

  1. docs_src/background_tasks/tutorial002.py

    
    def get_query(background_tasks: BackgroundTasks, q: Union[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"
        background_tasks.add_task(write_log, message)
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 675 bytes
    - Viewed (0)
  2. internal/event/target/postgresql.go

    		return err
    	}
    	return target.send(eventData)
    }
    
    // IsConnErr - To detect a connection error.
    func IsConnErr(err error) bool {
    	return xnet.IsConnRefusedErr(err) || err.Error() == "sql: database is closed" || err.Error() == "sql: statement is closed" || err.Error() == "invalid connection"
    }
    
    // send - sends an event to the PostgreSQL.
    func (target *PostgreSQLTarget) send(eventData event.Event) error {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  3. src/main/java/jcifs/smb/SmbCopyUtil.java

                        req.setFileInformation(new FileBasicInfo(ctime, atime, mtime, 0L, attrs));
                        dh.send(req);
                    }
                    else if ( dh.hasCapability(SmbConstants.CAP_NT_SMBS) ) {
                        // use the open file descriptor
                        dh.send(
                            new Trans2SetFileInformation(dh.getConfig(), dfd.getFid(), attrs, ctime, mtime, atime),
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Tue Jul 07 10:52:42 UTC 2020
    - 17.1K bytes
    - Viewed (0)
  4. internal/event/target/nats.go

    	}
    
    	if err := target.init(); err != nil {
    		return err
    	}
    
    	_, err := target.isActive()
    	if err != nil {
    		return err
    	}
    	return target.send(eventData)
    }
    
    // send - sends an event to the Nats.
    func (target *NATSTarget) send(eventData event.Event) error {
    	objectName, err := url.QueryUnescape(eventData.S3.Object.Key)
    	if err != nil {
    		return err
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 12.9K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/http/CallServerInterceptor.kt

              invokeStartEvent = false
            }
            if (responseBuilder == null) {
              if (requestBody.isDuplex()) {
                // Prepare a duplex body so that the application can send a request body later.
                exchange.flushRequest()
                val bufferedRequestBody = exchange.createRequestBody(request, true).buffer()
                requestBody.writeTo(bufferedRequestBody)
              } else {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_background_tasks/test_tutorial001.py

    from docs_src.background_tasks.tutorial001 import app
    
    client = TestClient(app)
    
    
    def test():
        log = Path("log.txt")
        if log.is_file():
            os.remove(log)  # pragma: no cover
        response = client.post("/send-notification/******@****.***")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Notification sent in the background"}
        with open("./log.txt") as f:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Jul 09 18:06:12 UTC 2020
    - 578 bytes
    - Viewed (0)
  7. src/main/java/jcifs/smb1/smb1/SmbFileOutputStream.java

        reqx.writeMode = 0;
    }
                    file.send( reqx, rspx );
                    fp += rspx.count;
                    len -= rspx.count;
                    off += rspx.count;
                } else {
                    req.setParam( file.fid, fp, len - w, b, off, w );
                    fp += rsp.count;
                    len -= rsp.count;
                    off += rsp.count;
                    file.send( req, rsp );
                }
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Fri Mar 22 21:10:40 UTC 2019
    - 9.2K bytes
    - Viewed (0)
  8. internal/event/target/redis.go

    		return err
    	}
    	if err := target.init(); err != nil {
    		return err
    	}
    	_, err := target.isActive()
    	if err != nil {
    		return err
    	}
    	return target.send(eventData)
    }
    
    // send - sends an event to the redis.
    func (target *RedisTarget) send(eventData event.Event) error {
    	conn := target.pool.Get()
    	defer conn.Close()
    
    	if target.args.Format == event.NamespaceFormat {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  9. src/main/java/jcifs/smb1/smb1/SmbRandomAccessFile.java

            }
    
            int r, n;
            SmbComReadAndXResponse response = new SmbComReadAndXResponse( b, off );
            do {
                r = len > readSize ? readSize : len;
                file.send( new SmbComReadAndX( file.fid, fp, r, null ), response );
                if(( n = response.dataLength ) <= 0 ) {
                    return (int)((fp - start) > 0L ? fp - start : -1);
                }
                fp += n;
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Fri Mar 22 21:10:40 UTC 2019
    - 10.9K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_background_tasks/test_tutorial002_an.py

    from docs_src.background_tasks.tutorial002_an import app
    
    client = TestClient(app)
    
    
    def test():
        log = Path("log.txt")
        if log.is_file():
            os.remove(log)  # pragma: no cover
        response = client.post("/send-notification/******@****.***?q=some-query")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Message sent"}
        with open("./log.txt") as f:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 571 bytes
    - Viewed (0)
Back to top