Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rdos
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien David
rdos
Commits
70a0a6b7
Commit
70a0a6b7
authored
4 years ago
by
Julien David
Browse files
Options
Downloads
Plain Diff
Merge branch '006--Help-Functions' into 'master'
help funciton See merge request
!8
parents
5c55c648
c0790438
No related branches found
No related tags found
1 merge request
!8
help funciton
Pipeline
#1502
passed
4 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
softwares/server/server.py
+19
-0
19 additions, 0 deletions
softwares/server/server.py
with
19 additions
and
0 deletions
softwares/server/server.py
+
19
−
0
View file @
70a0a6b7
...
...
@@ -48,6 +48,14 @@ def query_process(sock: socket, query: dict):
response
=
db
.
get_generators
()
sock
.
send
(
bytes
(
json
.
dumps
(
response
),
"
utf-8
"
))
print
(
"
database generators
"
,
response
)
# Sending default generator values
elif
((
list
(
query
.
keys
()))[
0
]
==
"
default
"
):
gen
=
query
[
"
default
"
]
print
(
"
generator :
"
,
gen
)
resp
=
get_generator_parameters_for_client
({
gen
})
sock
.
send
(
bytes
(
json
.
dumps
(
resp
),
"
utf-8
"
))
# Inserting client query in DATABASE
else
:
print
(
"
check
"
,
check_and_complete_parameters
(
query
))
...
...
@@ -72,6 +80,17 @@ def query_fields(addr, data):
return
s
# Function Client Generator gets from database a generator paramaters and default parameters
# Function takes a dict generator to send to database
# Function outputs the result from database
def
get_generator_parameters_for_client
(
generator
:
dict
):
if
generator
is
not
None
:
res
=
db
.
getParameters
(
generator
)
return
res
else
:
return
Exception
(
"
Generator Vide !!
"
)
# Function db_send_job send a query to insert in database by socket
# Function takes a socket and dictionary for input
# Function returns a string if query send
...
...
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
register
or
sign in
to comment