Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TFG-PanaderoPalazuelos
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
marpana
TFG-PanaderoPalazuelos
Commits
70b66148
Commit
70b66148
authored
Jul 23, 2022
by
marpana
Browse files
Options
Downloads
Patches
Plain Diff
cambios para presentacion
parent
a35db26b
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
cliente/cliente.py
+6
-2
6 additions, 2 deletions
cliente/cliente.py
clientepoblar/clientepoblar.py
+1
-1
1 addition, 1 deletion
clientepoblar/clientepoblar.py
with
7 additions
and
3 deletions
cliente/cliente.py
+
6
−
2
View file @
70b66148
...
@@ -2,7 +2,7 @@ import requests
...
@@ -2,7 +2,7 @@ import requests
import
time
import
time
import
threading
import
threading
from
datetime
import
datetime
from
datetime
import
datetime
token
=
5
555
#
token=5
modo
=
0
modo
=
0
buscarPartidaPath
=
'
http://localhost:3000/buscarPartida
'
buscarPartidaPath
=
'
http://localhost:3000/buscarPartida
'
guardarPartidaPath
=
'
http://localhost:3000/bbdd
'
guardarPartidaPath
=
'
http://localhost:3000/bbdd
'
...
@@ -11,6 +11,10 @@ hilos=20
...
@@ -11,6 +11,10 @@ hilos=20
def
cliente
():
def
cliente
():
inicio
=
time
.
time
()
inicio
=
time
.
time
()
numerohilo
=
hilo
.
getName
()
numerohilo
=
hilo
.
getName
()
if
(
numerohilo
==
'
Thread-1
'
):
numerohilo
=
0
token
=
int
(
numerohilo
)
+
1
objeto
=
{
'
token
'
:
token
,
"
id_modo
"
:
modo
,
"
hilo
"
:
numerohilo
}
objeto
=
{
'
token
'
:
token
,
"
id_modo
"
:
modo
,
"
hilo
"
:
numerohilo
}
response
=
requests
.
post
(
buscarPartidaPath
,
json
=
objeto
)
response
=
requests
.
post
(
buscarPartidaPath
,
json
=
objeto
)
...
@@ -47,7 +51,7 @@ def cliente():
...
@@ -47,7 +51,7 @@ def cliente():
res2
=
requests
.
post
(
guardarPartidaPath
,
json
=
postPartida2
)
res2
=
requests
.
post
(
guardarPartidaPath
,
json
=
postPartida2
)
for
num_hilo
in
range
(
hilos
):
for
num_hilo
in
range
(
hilos
):
hilo
=
threading
.
Thread
(
name
=
'
hilo%s
'
%
num_hilo
,
target
=
cliente
)
hilo
=
threading
.
Thread
(
name
=
num_hilo
,
target
=
cliente
)
hilo
.
start
()
hilo
.
start
()
...
...
This diff is collapsed.
Click to expand it.
clientepoblar/clientepoblar.py
+
1
−
1
View file @
70b66148
import
requests
import
requests
ficheroPath
=
"
/home/mariopanpal/Escritorio/
lista_
jugadores
_poblar
.csv
"
ficheroPath
=
"
/home/mariopanpal/Escritorio/jugadores
presentacion
.csv
"
poblarJugadoresPath
=
'
http://localhost:4000/poblarjugadores
'
poblarJugadoresPath
=
'
http://localhost:4000/poblarjugadores
'
fileName
=
{
"
pathListaJugadores
"
:
ficheroPath
}
fileName
=
{
"
pathListaJugadores
"
:
ficheroPath
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment