Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
DIARIO_MANAGER
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
DIARIO_MANAGER
Commits
d3ffe181
Commit
d3ffe181
authored
Jan 27, 2018
by
Philippe Valfok
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrigindo uso de subprocess
parent
3b0beffb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
src/backend/core/tasks.py
src/backend/core/tasks.py
+9
-4
No files found.
src/backend/core/tasks.py
View file @
d3ffe181
...
...
@@ -99,9 +99,11 @@ def criar_banco(cliente):
def
criar_subdominio
(
cliente
):
cliente
.
set_status
(
"Iniciando criação do subdomínio."
)
process
=
subprocess
.
run
(
'/run_add_domain.py'
,
cliente
.
domain_name
,
cliente
.
droplet_ip
[
'/run_add_domain.py'
,
cliente
.
domain_name
,
cliente
.
droplet_ip
],
stdout
=
subprocess
.
PIPE
)
cliente
.
set_status
(
process
.
stdout
.
decode
(
'utf-8'
)
.
strip
()
.
split
(
'
\n
'
)
.
pop
()
...
...
@@ -122,4 +124,7 @@ def configuracao_cliente_pipeline(cliente):
criar_droplet
(
cliente
)
criar_subdominio
(
cliente
)
except
Exception
as
err
:
cliente
.
set_status
(
err
)
print
(
err
)
cliente
.
set_status
(
"Erro ao adicionar novo cliente. ({})"
.
format
(
err
)
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment