Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Data Logistics 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
Releases
Package registry
Container 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
eFlows4HPC WP2
Data Logistics Service
Commits
8c689fd1
Commit
8c689fd1
authored
3 years ago
by
Jedrzej Rybicki
Browse files
Options
Downloads
Patches
Plain Diff
spelling
parent
67f3c269
No related branches found
No related tags found
No related merge requests found
Pipeline
#97401
passed
3 years ago
Stage: test
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dags/image_transfer.py
+0
-10
0 additions, 10 deletions
dags/image_transfer.py
with
0 additions
and
10 deletions
dags/image_transfer.py
+
0
−
10
View file @
8c689fd1
import
os
import
os
import
shutil
import
requests
import
requests
from
airflow.decorators
import
dag
,
task
from
airflow.decorators
import
dag
,
task
from
airflow.utils.dates
import
days_ago
from
airflow.utils.dates
import
days_ago
from
airflow.operators.python
import
PythonOperator
from
airflow.operators.python
import
PythonOperator
import
paramiko
from
decors
import
setup
,
get_connection
,
remove
from
decors
import
setup
,
get_connection
,
remove
...
@@ -13,13 +11,6 @@ default_args = {
...
@@ -13,13 +11,6 @@ default_args = {
'
owner
'
:
'
airflow
'
,
'
owner
'
:
'
airflow
'
,
}
}
class
FastTransport
(
paramiko
.
Transport
):
def
__init__
(
self
,
sock
):
super
(
FastTransport
,
self
).
__init__
(
sock
)
self
.
window_size
=
2147483647
self
.
packetizer
.
REKEY_BYTES
=
pow
(
2
,
40
)
self
.
packetizer
.
REKEY_PACKETS
=
pow
(
2
,
40
)
@dag
(
default_args
=
default_args
,
schedule_interval
=
None
,
start_date
=
days_ago
(
2
),
tags
=
[
'
example
'
])
@dag
(
default_args
=
default_args
,
schedule_interval
=
None
,
start_date
=
days_ago
(
2
),
tags
=
[
'
example
'
])
...
@@ -36,7 +27,6 @@ def transfer_image():
...
@@ -36,7 +27,6 @@ def transfer_image():
ssh_hook
=
get_connection
(
conn_id
=
connection_id
,
**
kwargs
)
ssh_hook
=
get_connection
(
conn_id
=
connection_id
,
**
kwargs
)
with
ssh_hook
.
get_conn
()
as
ssh_client
:
with
ssh_hook
.
get_conn
()
as
ssh_client
:
ssh_client
.
s
sftp_client
=
ssh_client
.
open_sftp
()
sftp_client
=
ssh_client
.
open_sftp
()
ssh_client
.
exec_command
(
command
=
f
"
mkdir -p
{
target
}
"
)
ssh_client
.
exec_command
(
command
=
f
"
mkdir -p
{
target
}
"
)
...
...
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