Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vospace-transfer-service
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
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
VOSpace INAF
vospace-transfer-service
Commits
17ced41c
Commit
17ced41c
authored
2 years ago
by
Cristiano Urban
Browse files
Options
Downloads
Patches
Plain Diff
Revert to the last commit.
Signed-off-by:
Cristiano Urban
<
cristiano.urban@inaf.it
>
parent
edb8c6b6
No related branches found
No related tags found
No related merge requests found
Pipeline
#17083
passed
2 years ago
Stage: dockerize
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
transfer_service/start_job_rpc_server.py
+3
-21
3 additions, 21 deletions
transfer_service/start_job_rpc_server.py
with
3 additions
and
21 deletions
transfer_service/start_job_rpc_server.py
+
3
−
21
View file @
17ced41c
...
...
@@ -52,8 +52,8 @@ class StartJobRPCServer(RedisRPCServer):
def
callback
(
self
,
requestBody
):
# debug block...
#
out = open("start_job_rpc_server_log.txt", "a")
#
out.write(json.dumps(requestBody))
out
=
open
(
"
start_job_rpc_server_log.txt
"
,
"
a
"
)
out
.
write
(
json
.
dumps
(
requestBody
))
job
=
Job
()
job
.
setId
(
requestBody
[
"
job
"
][
"
jobId
"
])
...
...
@@ -71,28 +71,10 @@ class StartJobRPCServer(RedisRPCServer):
"
errorCode
"
:
3
,
"
errorMsg
"
:
errorMsg
}
return
response
# Check if 'read_pending_queue' is full
if
pendingQueueLen
>=
self
.
maxPendingJobs
:
job
.
setPhase
(
"
ERROR
"
)
job
.
setErrorType
(
"
transient
"
)
errorMsg
=
"
Pending queue is full, please, retry later.
"
job
.
setErrorMessage
(
errorMsg
)
self
.
logger
.
warning
(
errorMsg
)
errorFlag
=
True
# Check if the user is already present in the VOSpace database. If not, change the job phase to 'ERROR'.
# The user must be created in the database using the 'vos_user' admin command.
elif
not
self
.
dbConn
.
getUserName
(
requestBody
[
"
job
"
][
"
ownerId
"
]):
job
.
setPhase
(
"
ERROR
"
)
job
.
setErrorType
(
"
transient
"
)
errorMsg
=
"
The user is registered in the authentication system (RAP), but is not present into the
'
users
'
table of the VOSpace database.
"
job
.
setErrorMessage
(
errorMsg
)
self
.
logger
.
warning
(
errorMsg
)
errorFlag
=
True
else
:
errorFlag
=
False
if
errorFlag
:
job
.
setErrorMessage
(
"
Pending queue is full, please, retry later.
"
)
try
:
self
.
dbConn
.
insertJob
(
job
)
except
Exception
:
...
...
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