Implemented alembic migrations, added cursors closing task.
This commit is contained in:
@@ -25,25 +25,67 @@ class QueryValidationError(ValueError):
|
||||
self.msg = msg
|
||||
super().__init__(msg)
|
||||
|
||||
|
||||
class QueryNotFound(HTTPException):
|
||||
def __init__(self, status_code=404, detail = {
|
||||
'message': "The referenced query was not found.",
|
||||
"code": 'query-not-found'
|
||||
}, headers = None):
|
||||
def __init__(
|
||||
self,
|
||||
status_code=404,
|
||||
detail={
|
||||
"message": "The referenced query was not found.",
|
||||
"code": "query-not-found",
|
||||
},
|
||||
headers=None,
|
||||
):
|
||||
super().__init__(status_code, detail, headers)
|
||||
|
||||
|
||||
class ConnectionNotFound(HTTPException):
|
||||
def __init__(self, status_code=404, detail = {
|
||||
'message': "The referenced connection was not found.",
|
||||
"code": 'connection-not-found'
|
||||
}, headers = None):
|
||||
def __init__(
|
||||
self,
|
||||
status_code=404,
|
||||
detail={
|
||||
"message": "The referenced connection was not found.",
|
||||
"code": "connection-not-found",
|
||||
},
|
||||
headers=None,
|
||||
):
|
||||
super().__init__(status_code, detail, headers)
|
||||
|
||||
|
||||
class PoolNotFound(HTTPException):
|
||||
def __init__(self, status_code=404, detail = {
|
||||
'message': "We didn't find a running Pool for the referenced connection.",
|
||||
"code": 'pool-not-found'
|
||||
}, headers = None):
|
||||
super().__init__(status_code, detail, headers)
|
||||
def __init__(
|
||||
self,
|
||||
status_code=404,
|
||||
detail={
|
||||
"message": "We didn't find a running Pool for the referenced connection.",
|
||||
"code": "pool-not-found",
|
||||
},
|
||||
headers=None,
|
||||
):
|
||||
super().__init__(status_code, detail, headers)
|
||||
|
||||
|
||||
class CursorNotFound(HTTPException):
|
||||
def __init__(
|
||||
self,
|
||||
status_code=404,
|
||||
detail={
|
||||
"message": "We didn't find a Cursor with the provided ID.",
|
||||
"code": "cursor-not-found",
|
||||
},
|
||||
headers=None,
|
||||
):
|
||||
super().__init__(status_code, detail, headers)
|
||||
|
||||
|
||||
class ClosedCursorUsage(HTTPException):
|
||||
def __init__(
|
||||
self,
|
||||
status_code=400,
|
||||
detail={
|
||||
"message": "The Cursor you are trying to use is closed.",
|
||||
"code": "cursor-closed",
|
||||
},
|
||||
headers=None,
|
||||
):
|
||||
super().__init__(status_code, detail, headers)
|
||||
|
||||
Reference in New Issue
Block a user