Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
周伟奇
/
bmw-ocr
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
0e0862dd
authored
2020-11-04 11:06:42 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix redis max_conn
1 parent
75758276
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
src/common/redis_cache/base.py
src/common/tools/mssql_script.py
src/common/redis_cache/base.py
View file @
0e0862d
...
...
@@ -41,7 +41,7 @@ def url_to_parts(url):
class
Redis
:
def
__init__
(
self
,
url
,
connection_pool
=
None
,
max_connections
=
1
0
,
socket_timeout
=
120
,
def
__init__
(
self
,
url
,
connection_pool
=
None
,
max_connections
=
2
0
,
socket_timeout
=
120
,
retry_on_timeout
=
None
,
socket_connect_timeout
=
None
):
self
.
_ConnectionPool
=
connection_pool
scheme
,
host
,
port
,
_
,
password
,
path
,
query
=
url_to_parts
(
url
)
...
...
src/common/tools/mssql_script.py
View file @
0e0862d
import
pyodbc
cnxn
=
pyodbc
.
connect
(
'DRIVER={ODBC Driver 17 for SQL Server};SERVER=
47.97.220.40;UID=SA;PWD=19951019Mssql
'
,
autocommit
=
True
)
cnxn
=
pyodbc
.
connect
(
'DRIVER={ODBC Driver 17 for SQL Server};SERVER=
localhost;UID=SA;PWD=pwd
'
,
autocommit
=
True
)
cursor
=
cnxn
.
cursor
()
cursor
.
execute
(
"create database afc"
)
...
...
@@ -436,7 +436,7 @@ afc_sql = """
on afc_doc (application_id, status);
"""
hil_cnxn
=
pyodbc
.
connect
(
'DRIVER={ODBC Driver 17 for SQL Server};SERVER=
47.97.220.40
;DATABASE=hil;UID=SA;PWD=pwd'
,
autocommit
=
True
)
hil_cnxn
=
pyodbc
.
connect
(
'DRIVER={ODBC Driver 17 for SQL Server};SERVER=
localhost
;DATABASE=hil;UID=SA;PWD=pwd'
,
autocommit
=
True
)
hil_cursor
=
hil_cnxn
.
cursor
()
hil_cursor
.
execute
(
hil_sql_1
)
...
...
@@ -445,7 +445,7 @@ hil_cursor.execute(hil_sql_2)
hil_cursor
.
close
()
hil_cnxn
.
close
()
afc_cnxn
=
pyodbc
.
connect
(
'DRIVER={ODBC Driver 17 for SQL Server};SERVER=
47.97.220.40
;DATABASE=afc;UID=SA;PWD=pwd'
,
autocommit
=
True
)
afc_cnxn
=
pyodbc
.
connect
(
'DRIVER={ODBC Driver 17 for SQL Server};SERVER=
localhost
;DATABASE=afc;UID=SA;PWD=pwd'
,
autocommit
=
True
)
afc_cursor
=
afc_cnxn
.
cursor
()
afc_cursor
.
execute
(
afc_sql
)
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment