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
045f64e7
Commit
045f64e7
authored
Dec 11, 2020
by
Cristiano Urban
Browse files
Options
Downloads
Patches
Plain Diff
Added exec_wait_time parameter in configuration file.
Signed-off-by:
Cristiano Urban
<
cristiano.urban@inaf.it
>
parent
689f6d3e
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
transfer_service/preprocessor.py
+6
-0
6 additions, 0 deletions
transfer_service/preprocessor.py
transfer_service/store_preprocessor.py
+2
-3
2 additions, 3 deletions
transfer_service/store_preprocessor.py
transfer_service/vos_ts.conf
+4
-1
4 additions, 1 deletion
transfer_service/vos_ts.conf
with
12 additions
and
4 deletions
transfer_service/preprocessor.py
+
6
−
0
View file @
045f64e7
import
time
from
multiprocessing
import
Process
from
config
import
Config
...
...
@@ -11,10 +13,14 @@ class Preprocessor(Process):
self
.
params
=
config
.
loadSection
(
"
scheduling
"
)
self
.
maxPendingJobs
=
self
.
params
.
getint
(
"
max_pending_jobs
"
)
self
.
maxReadyJobs
=
self
.
params
.
getint
(
"
max_ready_jobs
"
)
self
.
execWaitTime
=
self
.
params
.
getint
(
"
exec_wait_time
"
)
self
.
pendingQueue
=
JobQueue
(
"
pending
"
)
self
.
readyQueue
=
JobQueue
(
"
ready
"
)
super
(
Preprocessor
,
self
).
__init__
()
def
wait
(
self
):
time
.
sleep
(
self
.
execWaitTime
)
def
run
(
self
):
"""
This method must be implemented by
...
...
This diff is collapsed.
Click to expand it.
transfer_service/store_preprocessor.py
+
2
−
3
View file @
045f64e7
...
...
@@ -7,9 +7,9 @@ import json
import
os
import
shutil
import
sys
import
time
from
datetime
import
datetime
as
dt
from
checksum
import
Checksum
from
file_grouper
import
FileGrouper
from
db_connector
import
DbConnector
...
...
@@ -169,7 +169,7 @@ class StorePreprocessor(Preprocessor):
def
run
(
self
):
while
True
:
time
.
sleep
(
10
)
self
.
wait
(
)
if
(
self
.
readyQueue
.
len
()
<=
self
.
maxReadyJobs
and
self
.
pendingQueue
.
len
()
>
0
):
self
.
jobObj
=
self
.
pendingQueue
.
getJob
()
self
.
username
=
self
.
jobObj
[
"
jobInfo
"
][
"
userName
"
]
...
...
@@ -177,7 +177,6 @@ class StorePreprocessor(Preprocessor):
self
.
execute
()
self
.
pendingQueue
.
moveJobTo
(
"
ready
"
)
print
(
"
Job MOVED!
"
)
time
.
sleep
(
10
)
# Test
#sp = StorePreprocessor()
...
...
This diff is collapsed.
Click to expand it.
transfer_service/vos_ts.conf
+
4
−
1
View file @
045f64e7
...
...
@@ -43,7 +43,7 @@ port = 5672
[
checksum
]
;
suffix
for
files
containing
MD5
checksums
md5_file_suffix
= -
md5sum
.
txt
;
buffer
size
in
bytes
when
reading
a
chunk
,
default
is
4096
B
;
buffer
size
in
bytes
when
reading
a
chunk
of
data
,
default
is
4096
B
file_buffer_size
=
4096
[
file_grouper
]
...
...
@@ -57,6 +57,9 @@ max_dir_size = 100
max_pending_jobs
=
32
;
maximum
number
of
jobs
within
a
'ready'
queue
,
default
is
4
max_ready_jobs
=
4
;
minimum
time
interval
in
seconds
between
two
consecutive
checks
on
;
job
queues
(
do
NOT
set
to
zero
),
default
is
15
s
exec_wait_time
=
15
####################
...
...
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