Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Luciano Barletta
/
message-service
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
1
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit 8095ea7e
authored
2019-10-16 10:12:58 -0300
by
Luciano Barletta
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed sqlite bug
1 parent
e1ec510d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
process.py
services.py
process.py
View file @
8095ea7
from
services
import
serviceFactory
from
database
import
DBconnection
from
enums
import
Services
,
States
,
Datatypes
,
Table
import
os
,
json
import
os
,
json
,
ipdb
class
Process
:
...
...
@@ -45,10 +45,12 @@ class Process:
Table
.
dest
:
query
[
Table
.
dest
],
Table
.
serv
:
query
[
Table
.
serv
],
Table
.
type
:
query
[
Table
.
type
],
Table
.
info
:
query
[
Table
.
info
],
Table
.
conf
:
query
[
Table
.
conf
],
Table
.
state
:
States
.
queued
}
if
query
[
Table
.
info
]:
entities
[
Table
.
info
]
=
query
[
Table
.
info
]
if
query
[
Table
.
conf
]:
entities
[
Table
.
conf
]
=
query
[
Table
.
conf
]
error
=
self
.
conn
.
update
(
"msg"
,(
Table
.
id
,
query
[
Table
.
id
]),
entities
)
if
error
:
return
error
...
...
@@ -80,7 +82,7 @@ class Process:
# todo enviado
if
len
(
d
)
==
0
:
# no se espera confirmacion
if
query
[
Table
.
conf
]
==
'None'
or
query
[
Table
.
conf
]
==
'None'
:
if
query
[
Table
.
conf
]
==
None
:
self
.
conn
.
query
(
"DELETE FROM msg WHERE id = ?"
,(
query
[
Table
.
id
],))
del
query
[
Table
.
id
]
self
.
conn
.
insert
(
"history"
,
query
)
...
...
services.py
View file @
8095ea7
...
...
@@ -63,7 +63,6 @@ class Wpp1(ServiceBase):
return
type
in
Wpp1
.
Allowed
def
validateinfo
(
self
,
info
):
info
=
None
if
info
==
'None'
else
info
if
info
==
None
:
return
True
i
=
json
.
loads
(
info
)
...
...
@@ -134,7 +133,6 @@ class Mail(ServiceBase):
return
type
in
Mail
.
Allowed
def
validateinfo
(
self
,
info
):
info
=
None
if
info
==
'None'
else
info
if
info
==
None
:
return
False
i
=
json
.
loads
(
info
)
...
...
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