Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Owo Sugiana
/
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 fc3ae5e1
authored
Jul 19, 2020
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Bug fixed init_db_linkaja.py
1 parent
a1c645b7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
6 deletions
README.rst
iso8583_web/scripts/init_db_linkaja.py
README.rst
View file @
fc3ae5e
...
...
@@ -46,6 +46,7 @@ Buat file konfigurasi ``test-pemda.ini``::
[logger_iso8583_web]
level = DEBUG
handlers =
qualname = iso8583_web
[handler_console]
...
...
@@ -131,6 +132,7 @@ Buka terminal ke-2, dan buat file ``test-bank.ini``::
[logger_iso8583_web]
level = DEBUG
handlers =
qualname = iso8583_web
[handler_console]
...
...
@@ -162,7 +164,7 @@ Buka terminal ke-2, dan buat file ``test-bank.ini``::
[web_teller]
route_path = /rpc
host = pemda
module = iso8583_web.scripts.view.jsonrpc
module = iso8583_web.scripts.view
s
.jsonrpc
allowed_ip =
127.0.0.1
10.8.20.1
...
...
@@ -363,7 +365,11 @@ database-nya terlebih dahulu. Lalu tambahkan baris berikut ini di file
127.0.0.1
10.8.30.1
Coba inquiry::
Buat tabelnya::
$ ~/env/bin/init_db_linkaja test-bank.ini
Restart daemon-nya, lalu di terminal ke-3 coba inquiry::
$ ~/env/bin/iso8583_web_client_linkaja --url=http://127.0.0.1:7000/linkaja --invoice-id=3271010001007002701995
...
...
iso8583_web/scripts/init_db_linkaja.py
View file @
fc3ae5e
...
...
@@ -8,7 +8,13 @@ def main(argv=sys.argv):
conf_file
=
argv
[
1
]
conf
=
ConfigParser
()
conf
.
read
(
conf_file
)
cf
=
conf
[
'module_iso8583_web.scripts.views.linkaja'
]
engine
=
create_engine
(
cf
[
'db_url'
])
engine
.
echo
=
True
Base
.
metadata
.
create_all
(
engine
)
for
section
in
conf
.
sections
():
if
section
.
find
(
'web_'
)
<
0
:
continue
module_name
=
conf
.
get
(
section
,
'module'
)
if
module_name
!=
'iso8583_web.scripts.views.linkaja'
:
continue
db_url
=
conf
.
get
(
section
,
'db_url'
)
engine
=
create_engine
(
db_url
)
engine
.
echo
=
True
Base
.
metadata
.
create_all
(
engine
)
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