(status)
| 618 | self.start_blocking_transaction() |
| 619 | |
| 620 | def raw(status): |
| 621 | try: |
| 622 | list( |
| 623 | Person.objects.raw( |
| 624 | class="st">"SELECT * FROM %s %s" |
| 625 | % ( |
| 626 | Person._meta.db_table, |
| 627 | connection.ops.for_update_sql(nowait=True), |
| 628 | ) |
| 629 | ) |
| 630 | ) |
| 631 | except DatabaseError as e: |
| 632 | status.append(e) |
| 633 | finally: |
| 634 | class="cm"># This method is run in a separate thread. It uses its own |
| 635 | class="cm"># database connection. Close it without waiting for the GC. |
| 636 | class="cm"># Connection cannot be closed on Oracle because cursor is still |
| 637 | class="cm"># open. |
| 638 | if connection.vendor != class="st">"oracle": |
| 639 | connection.close() |
| 640 | |
| 641 | status = [] |
| 642 | thread = threading.Thread(target=raw, kwargs={class="st">"status": status}) |
no test coverage detected