Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
iso8583
/
iso8583-web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b53ac09f
authored
Mar 31, 2019
by
Aplikasi Samsat Banten
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
live-opensipkd
1 parent
95920c62
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
iso8583_web/scripts/forwarder.py
iso8583_web/scripts/forwarder.py
View file @
b53ac09
...
...
@@ -37,6 +37,7 @@ from ..read_conf import (
allowed_ips
,
get_conf
,
name_conf
,
get_str
,
get_int
)
...
...
@@ -606,14 +607,18 @@ def get_db(conf_file):
if
'main'
not
in
conf
.
sections
():
return
settings
=
conf
[
'main'
]
if
'sqlalchemy.url'
not
in
settings
:
#settings = conf.sections()
#print settings, settings['main']
#if 'sqlalchemy.url' not in settings:
# log_message('SQL URL Not Foune')
# return
pool_size
=
get_int
(
conf
,
'main'
,
'pool_size'
,
5
)
max_overflow
=
get_int
(
conf
,
'main'
,
'max_overflow'
,
10
)
url
=
get_str
(
conf
,
'main'
,
'sqlalchemy.url'
,
None
)
if
not
url
:
return
pool_size
=
'pool_size'
in
settings
and
int
(
settings
[
'pool_size'
])
or
5
max_overflow
=
'max_overflow'
in
settings
and
int
(
settings
[
'max_overflow'
])
or
10
url
=
settings
[
'sqlalchemy.url'
]
print
(
url
,
pool_size
,
max_overflow
)
engine
=
create_engine
(
url
,
max_overflow
=
max_overflow
,
pool_size
=
pool_size
)
...
...
Write
Preview
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