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 c6d8f7ff
authored
2020-07-19 11:33:30 -0300
by
Tu Nombre
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Ya dejo andandando algo
1 parent
af801d86
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
2 deletions
Wpp1State.py
process.py
services.py
Wpp1State.py
View file @
c6d8f7f
...
...
@@ -62,6 +62,8 @@ class StateMail():
respuesta en cache durante 60 segundos para mejorar performance y si no esta
disponible no se almasena y la proxima respuesta debera hacerse contra el server
remoto para asegurarme de q se solucione el problema"""
if
Host
==
"MAILMASIVO"
:
return
(
True
)
test
=
self
.
revisarCache
(
User
,
Pass
,
Port
,
Host
)
if
not
test
==
"Vencido"
:
return
(
test
)
...
...
process.py
View file @
c6d8f7f
...
...
@@ -66,6 +66,7 @@ class Process:
def
_send
(
self
,
state
,
serv
):
salio
=
0
rows
=
self
.
conn
.
query
(
"SELECT * FROM msg WHERE state = ? and serv = ? "
,(
state
,
serv
))
if
not
len
(
rows
)
==
0
:
print
(
"cantidad pendiente "
,
serv
,
len
(
rows
))
for
query
in
DBconnection
.
parseToTable
(
rows
):
# si no existe la carpeta borrar el mensaje
...
...
@@ -99,7 +100,7 @@ class Process:
elif
partial
:
self
.
conn
.
query
(
"UPDATE msg SET state = ?, type = ? WHERE id = ?"
,(
States
.
partial
,
json
.
dumps
(
d
),
query
[
Table
.
id
]))
if
salio
>
20
:
print
(
"corto para q no se aga larga proces
100"
)
print
(
"corto para q no se haga larga proces linea
100"
)
return
()
# devuelve el estado de un mensaje, lo archiva si está enviado
...
...
services.py
View file @
c6d8f7f
...
...
@@ -183,7 +183,7 @@ class Mail(ServiceBase):
return
(
n
)
def
sendGrid
(
self
,
msg
,
smtp
):
#import ipdb; ipdb.set_trace(
)
print
(
"Saliendo por sendgrid"
)
texto
=
open
(
self
.
TextoaEnviar
,
"r"
)
.
read
()
Mail
=
smtp
[
"username"
]
KeyAPI
=
smtp
[
"password"
]
...
...
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