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 2a6e0edc
authored
2024-04-09 16:23:29 -0300
by
juan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Server nuevo
1 parent
fc9fc32f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
Wpp1State.py
deploy.py
services.py
Wpp1State.py
View file @
2a6e0ed
...
...
@@ -121,9 +121,10 @@ class StateMail():
"""Devuelve la cantidad de mails que se puede enviar diariamente
La lista de donde se toma esta informacion esta en un json
Mira la configuracion"""
try
:
n
=
200
with
open
(
config
.
ArchivoLimitesHosts
)
as
json_file
:
data
=
json
.
load
(
json_file
)
try
:
n
=
data
[
host
]
except
:
n
=
config
.
LimiteDiario
...
...
deploy.py
View file @
2a6e0ed
...
...
@@ -179,4 +179,4 @@ if __name__ == "__main__":
# creo msg/ si no existe
if
not
os
.
path
.
exists
(
msgfolder
):
os
.
mkdir
(
msgfolder
)
app
.
run
(
host
=
"0.0.0.0"
,
port
=
8
080
)
app
.
run
(
host
=
"0.0.0.0"
,
port
=
9
080
)
services.py
View file @
2a6e0ed
...
...
@@ -84,8 +84,8 @@ class Wpp1(ServiceBase):
path
=
requests
.
post
(
url
=
Wpp1
.
server
,
files
=
{
'data'
:
(
file
,
open
(
filepath
,
'rb'
))
})
result
=
requests
.
get
(
url
=
Wpp1
.
URL
+
Wpp1
.
URLmode
[
types
[
file
]],
params
=
{
'token'
:
Wpp1
.
token
,
'uid'
:
origen
,
'to'
:
data
[
Table
.
dest
],
'url'
:
Wpp1
.
server
+
path
.
text
})
succ
[
file
]
=
result
.
json
()[
'success'
]
except
:
print
(
"ROMPIO ALGO EN EL ENVIO
"
)
except
Exception
as
E
:
print
(
f
"ROMPIO ALGO EN EL ENVIO: {E}
"
)
succ
[
file
]
=
False
return
succ
...
...
@@ -159,8 +159,8 @@ class Mail(ServiceBase):
self
.
Envio
(
msg
,
info
,
stadomail
)
else
:
succ
[
file
]
=
False
except
:
print
(
"ROMPIO ALGO EN EL ENVIO
"
)
except
Exception
as
E
:
print
(
f
"ROMPIO ALGO EN EL ENVIO: {E}
"
)
stadomail
.
MailRompedor
.
append
(
msg
[
'From'
])
succ
[
file
]
=
False
return
succ
...
...
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