Django 3.0.x Documentationrun any of these parts from a thread where there is a running event loop, you will get a SynchronousOnlyOperation error. Note that you don’t have to be inside an async function directly to have this error request to make sure the socket is closed cleanly. ## SynchronousOnlyOperation ## exception SynchronousOnlyOperation[source] The SynchronousOnlyOperation exception is raised when code that is only allowed from async code before, this may trigger if you were doing it incorrectly. If you see a SynchronousOnlyOperation error, then closely examine your code and move any database operations to be in a synchronous0 码力 | 3085 页 | 2.95 MB | 2 年前3
Django 4.2.x Documentationcode - it will block up the event loop (or, more likely, Django will notice and raise a SynchronousOnlyOperation to stop that from happening). Fortunately, you can do many queries using Django’s asynchronous supported with asynchronous queries and updates. You will find that trying to use one raises SynchronousOnlyOperation. If you wish to use a transaction, we suggest you write your ORM code inside a separate run any of these parts from a thread where there is a running event loop, you will get a SynchronousOnlyOperation error. Note that you don’t have to be inside an async function directly to have this error0 码力 | 3305 页 | 3.16 MB | 2 年前3
Django 5.0.x Documentationcode - it will block up the event loop (or, more likely, Django will notice and raise a SynchronousOnlyOperation to stop that from happening). Fortunately, you can do many queries using Django's asynchronous supported with asynchronous queries and updates. You will find that trying to use one raises SynchronousOnlyOperation. If you wish to use a transaction, we suggest you write your ORM code inside a separate run any of these parts from a thread where there is a running event loop, you will get a SynchronousOnlyOperation error. Note that you don’t have to be inside an async function directly to have this error0 码力 | 2878 页 | 9.60 MB | 2 年前3
Django 4.1.x Documentationcode - it will block up the event loop (or, more likely, Django will notice and raise a SynchronousOnlyOperation to stop that from happening). Fortunately, you can do many queries using Django's asynchronous supported with asynchronous queries and updates. You will find that trying to use one raises SynchronousOnlyOperation. If you wish to use a transaction, we suggest you write your ORM code inside a separate run any of these parts from a thread where there is a running event loop, you will get a SynchronousOnlyOperation error. Note that you don’t have to be inside an async function directly to have this error0 码力 | 2777 页 | 9.32 MB | 2 年前3
Django 4.2.x Documentationcode - it will block up the event loop (or, more likely, Django will notice and raise a SynchronousOnlyOperation to stop that from happening). Fortunately, you can do many queries using Django's asynchronous supported with asynchronous queries and updates. You will find that trying to use one raises SynchronousOnlyOperation. If you wish to use a transaction, we suggest you write your ORM code inside a separate run any of these parts from a thread where there is a running event loop, you will get a SynchronousOnlyOperation error. Note that you don’t have to be inside an async function directly to have this error0 码力 | 2842 页 | 9.47 MB | 2 年前3
Django 5.1.2 Documentationcode - it will block up the event loop (or, more likely, Django will notice and raise a SynchronousOnlyOperation to stop that from happening). Fortunately, you can do many queries using Django's asynchronous supported with asynchronous queries and updates. You will find that trying to use one raises SynchronousOnlyOperation. If you wish to use a transaction, we suggest you write your ORM code inside a separate run any of these parts from a thread where there is a running event loop, you will get a SynchronousOnlyOperation error. Note that you don’t have to be inside an async function directly to have this error0 码力 | 2923 页 | 9.62 MB | 1 年前3
Django 5.1 Documentationcode - it will block up the event loop (or, more likely, Django will notice and raise a SynchronousOnlyOperation to stop that from happening). Fortunately, you can do many queries using Django's asynchronous supported with asynchronous queries and updates. You will find that trying to use one raises SynchronousOnlyOperation. If you wish to use a transaction, we suggest you write your ORM code inside a separate run any of these parts from a thread where there is a running event loop, you will get a SynchronousOnlyOperation error. Note that you don’t have to be inside an async function directly to have this error0 码力 | 2917 页 | 9.59 MB | 1 年前3
Django 5.0.x Documentationcode - it will block up the event loop (or, more likely, Django will notice and raise a SynchronousOnlyOperation to stop that from happening). Fortunately, you can do many queries using Django’s asynchronous supported with asynchronous queries and updates. You will find that trying to use one raises SynchronousOnlyOperation. If you wish to use a transaction, we suggest you write your ORM code inside run any of these parts from a thread where there is a running event loop, you will get a SynchronousOnlyOperation error. Note that you don’t have to be inside an async function directly to have this error0 码力 | 3407 页 | 3.21 MB | 2 年前3
Django 5.1 Documentationcode - it will block up the event loop (or, more likely, Django will notice and raise a synchronousOnlyOperation to stop that from happening). Fortunately, you can do many queries using Django's asynchronous supported with asynchronous queries and updates. You will find that trying to use one raises SynchronousOnlyOperation. If you wish to use a transaction, we suggest you write your ORM code inside0 码力 | 3513 页 | 3.17 MB | 1 年前3
Django 5.1.2 Documentationcode - it will block up the event loop (or, more likely, Django will notice and raise a synchronousOnlyOperation to stop that from happening). Fortunately, you can do many queries using Django's asynchronous supported with asynchronous queries and updates. You will find that trying to use one raises SynchronousOnlyOperation. If you wish to use a transaction, we suggest you write your ORM code inside0 码力 | 3519 页 | 3.17 MB | 1 年前3
共 17 条
- 1
- 2













