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 fec4d9cc
authored
Jan 13, 2023
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Log concurrent Invoice ID yang rinci
1 parent
43bb754b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
iso8583_web/iso8583/__init__.py
iso8583_web/iso8583/__init__.py
View file @
fec4d9c
...
...
@@ -349,18 +349,26 @@ class Parser(Log):
def
remove_invoice_id
(
self
,
inv_id
):
remove_invoice_id
(
self
.
ip_port
,
inv_id
)
if
inv_id
in
invoice_ids
[
self
.
ip_port
]:
self
.
log_debug
(
f
'Antrian Invoice ID {inv_id} berkurang, threads '
f
'{invoice_ids[self.ip_port][inv_id]}'
)
else
:
self
.
log_debug
(
f
'Antrian Invoice ID {inv_id} sudah habis'
)
def
is_my_turn
(
self
,
inv_id
):
mem_id
=
invoice_ids
[
self
.
ip_port
][
inv_id
][
0
]
return
mem_id
==
self
.
parser_id
def
wait_for_same_invoice_id
(
self
,
inv_id
):
self
.
log_debug
(
f
'Antrian {invoice_ids[self.ip_port][inv_id]}'
)
self
.
log_debug
(
f
'Antrian Invoice ID {inv_id} threads '
f
'{invoice_ids[self.ip_port][inv_id]}'
)
sleep
(
1
)
duration
=
time
()
-
self
.
begin_time
if
duration
<
10
:
return
True
self
.
log_error
(
'T
imeout'
)
self
.
log_error
(
f
'Invoice ID {inv_id} thread {self.parser_id} t
imeout'
)
self
.
running
=
False
def
run
(
self
):
...
...
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