Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
swh-dataset
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
Antoine Lambert
swh-dataset
Commits
a1cf9b87
Commit
a1cf9b87
authored
2 years ago
by
vlorentz
Browse files
Options
Downloads
Patches
Plain Diff
luigi: Send progress reports to the scheduler
parent
99a59937
No related branches found
Branches containing commit
Tags
v1.0.1
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
swh/dataset/luigi.py
+8
-3
8 additions, 3 deletions
swh/dataset/luigi.py
with
8 additions
and
3 deletions
swh/dataset/luigi.py
+
8
−
3
View file @
a1cf9b87
...
...
@@ -66,7 +66,7 @@ For example:
"
hostname
"
:
"
desktop5
"
,
"
tool
"
: {
"
name
"
:
"
swh.dataset
"
,
"
version
"
:
"
0.3.2
"
,
"
version
"
:
"
0.3.2
"
}
}
...
...
@@ -403,9 +403,11 @@ class UploadExportToS3(luigi.Task):
# intermediary object types (eg. origin_visit, origin_visit_status)
# do not have their own directory
continue
status_message
=
f
"
Uploading
{
format_
.
name
}
/
{
object_type
.
name
}
/
"
self
.
set_status_message
(
status_message
)
for
file_
in
tqdm
.
tqdm
(
list
(
os
.
listdir
(
local_dir
)),
desc
=
f
"
Uploading
{
format_
.
name
}
/
{
object_type
.
name
}
/
"
,
desc
=
status_message
,
):
client
.
put_multipart
(
local_dir
/
file_
,
f
"
{
s3_dir
}
/
{
file_
}
"
,
ACL
=
"
public-read
"
...
...
@@ -443,6 +445,7 @@ class DownloadExportFromS3(luigi.Task):
expected location.
"""
return
[
UploadExportToS3
(
local_export_path
=
self
.
local_export_path
,
formats
=
self
.
formats
,
object_types
=
self
.
object_types
,
s3_export_path
=
self
.
s3_export_path
,
...
...
@@ -479,9 +482,11 @@ class DownloadExportFromS3(luigi.Task):
# do not have their own directory
continue
local_dir
.
mkdir
(
parents
=
True
,
exist_ok
=
True
)
status_message
=
f
"
Downloading
{
format_
.
name
}
/
{
object_type
.
name
}
/
"
self
.
set_status_message
(
status_message
)
for
file_
in
tqdm
.
tqdm
(
files
,
desc
=
f
"
Downloading
{
format_
.
name
}
/
{
object_type
.
name
}
/
"
,
desc
=
status_message
,
):
client
.
get
(
f
"
{
s3_dir
}
/
{
file_
}
"
,
...
...
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