Skip to content
This repository has been archived by the owner on Jan 18, 2020. It is now read-only.

Add tools for tracking and canceling a query #280

Closed
bruth opened this issue Jan 12, 2015 · 2 comments
Closed

Add tools for tracking and canceling a query #280

bruth opened this issue Jan 12, 2015 · 2 comments

Comments

@bruth
Copy link
Contributor

bruth commented Jan 12, 2015

Two functions that are database dependent:

  • Function that takes a connection and gets the process ID for a query that is running.
  • Function that takes the ID and cancels the query
@bruth bruth self-assigned this Jan 12, 2015
bruth added a commit that referenced this issue Jan 23, 2015
Named connections are created and added to the `django.db.connections`
handler dynamically. The Django cache is used to store the derived
database alias and the process ID for the connection. This ensures
other threads or processes can lookup the process ID by name and cancel
the query using an separate connection. The only exception being
SQLite which can be interrupted across connections since it is
serverless.

At this time, the Oracle backend is not yet supported.

Close #280

Signed-off-by: Byron Ruth <b@devel.io>
bruth added a commit that referenced this issue Jan 23, 2015
Named connections are created and added to the `django.db.connections`
handler dynamically. The Django cache is used to store the derived
database alias and the process ID for the connection. This ensures
other threads or processes can lookup the process ID by name and cancel
the query using an separate connection. The only exception being
SQLite which can be interrupted across connections since it is
serverless.

At this time, the Oracle backend is not yet supported.

Close #280

Signed-off-by: Byron Ruth <b@devel.io>
bruth added a commit that referenced this issue Jan 23, 2015
Named connections are created and added to the `django.db.connections`
handler dynamically. The Django cache is used to store the derived
database alias and the process ID for the connection. This ensures
other threads or processes can lookup the process ID by name and cancel
the query using an separate connection. The only exception being
SQLite which can be interrupted across connections since it is
serverless.

At this time, the Oracle backend is not yet supported.

Close #280

Signed-off-by: Byron Ruth <b@devel.io>
@bruth bruth closed this as completed in a9dfe65 Jan 23, 2015
@murphyke
Copy link
Member

Re: future Oracle support, the standard Python Oracle driver seems to be cx_Oracle, which has a cancel extension method in its connection class. This "cancels a long-running transaction".

@bruth
Copy link
Contributor Author

bruth commented Jan 23, 2015

@murphyke Thanks. Should be easy enough to add.

bruth added a commit that referenced this issue Jan 25, 2015
This was introduced in #280, however it is simpler to use the
`isolate_queryset` to wrap an QuerySet and pass it into the the
processor.

Signed-off-by: Byron Ruth <b@devel.io>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants