Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nomad-FAIR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
Service Desk
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
nomad-lab
nomad-FAIR
Commits
a4d26e2a
Commit
a4d26e2a
authored
5 years ago
by
Markus Scheidgen
Browse files
Options
Downloads
Patches
Plain Diff
Minor fixes to re-processes CLI.
parent
35bdf4bf
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!48
v0.5.0 Release
Pipeline
#52332
passed
5 years ago
Stage: build
Stage: test
Stage: release
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
nomad/admin/upload.py
+8
-10
8 additions, 10 deletions
nomad/admin/upload.py
ops/deployments/nomad.migration.direct.env.sh
+1
-0
1 addition, 0 deletions
ops/deployments/nomad.migration.direct.env.sh
with
9 additions
and
10 deletions
nomad/admin/upload.py
+
8
−
10
View file @
a4d26e2a
...
@@ -40,9 +40,10 @@ def upload(ctx, user: str, staging: bool, processing: bool, outdated: bool):
...
@@ -40,9 +40,10 @@ def upload(ctx, user: str, staging: bool, processing: bool, outdated: bool):
query
&=
Q
(
process_status
=
proc
.
PROCESS_RUNNING
)
|
Q
(
tasks_status
=
proc
.
RUNNING
)
query
&=
Q
(
process_status
=
proc
.
PROCESS_RUNNING
)
|
Q
(
tasks_status
=
proc
.
RUNNING
)
if
outdated
:
if
outdated
:
uploads
=
proc
.
Calc
.
objects
(
uploads
=
proc
.
Calc
.
_get_collection
().
distinct
(
{
'
metadata.nomad_version__ne
'
:
config
.
version
}).
distinct
(
field
=
'
upload_id
'
)
'
upload_id
'
,
query
&=
Q
(
uploads__in
=
uploads
)
{
'
metadata.nomad_version
'
:
{
'
$ne
'
:
config
.
version
}})
query
&=
Q
(
upload_id__in
=
uploads
)
ctx
.
obj
.
query
=
query
ctx
.
obj
.
query
=
query
ctx
.
obj
.
uploads
=
proc
.
Upload
.
objects
(
query
)
ctx
.
obj
.
uploads
=
proc
.
Upload
.
objects
(
query
)
...
@@ -155,11 +156,8 @@ def re_process(ctx, uploads):
...
@@ -155,11 +156,8 @@ def re_process(ctx, uploads):
logger
=
utils
.
get_logger
(
__name__
)
logger
=
utils
.
get_logger
(
__name__
)
print
(
'
%d uploads selected, re-processing ...
'
%
uploads
.
count
())
print
(
'
%d uploads selected, re-processing ...
'
%
uploads
.
count
())
def
re_process_upload
(
upload_id
:
str
):
def
re_process_upload
(
upload
:
str
):
logger
.
info
(
'
re-processing started
'
,
upload_id
=
upload_id
)
logger
.
info
(
'
re-processing started
'
,
upload_id
=
upload
.
upload_id
)
upload
=
proc
.
Upload
.
objects
(
upload_id
=
upload_id
).
first
()
if
upload
is
None
:
logger
.
error
(
'
upload for re-processing does not exist
'
,
upload_id
=
upload_id
)
upload
.
re_process_upload
()
upload
.
re_process_upload
()
upload
.
block_until_complete
(
interval
=
.
1
)
upload
.
block_until_complete
(
interval
=
.
1
)
...
@@ -167,8 +165,8 @@ def re_process(ctx, uploads):
...
@@ -167,8 +165,8 @@ def re_process(ctx, uploads):
logger
.
info
(
'
re-processing complete
'
,
upload_id
=
upload_id
)
logger
.
info
(
'
re-processing complete
'
,
upload_id
=
upload_id
)
count
=
0
count
=
0
for
upload
_id
in
uploads
:
for
upload
in
uploads
:
re_process_upload
(
upload
_id
)
re_process_upload
(
upload
)
count
+=
1
count
+=
1
print
(
'
re-processed %s of %s uploads
'
%
(
count
,
len
(
uploads
)))
print
(
'
re-processed %s of %s uploads
'
%
(
count
,
len
(
uploads
)))
...
...
This diff is collapsed.
Click to expand it.
ops/deployments/nomad.migration.direct.env.sh
+
1
−
0
View file @
a4d26e2a
...
@@ -7,3 +7,4 @@ export NOMAD_FS_LOCAL_TMP=/nomad/fairdi/migration/fs/tmp
...
@@ -7,3 +7,4 @@ export NOMAD_FS_LOCAL_TMP=/nomad/fairdi/migration/fs/tmp
export
NOMAD_FS_STAGING
=
/nomad/fairdi/migration/fs/staging
export
NOMAD_FS_STAGING
=
/nomad/fairdi/migration/fs/staging
export
NOMAD_FS_PUBLIC
=
/nomad/fairdi/migration/fs/public
export
NOMAD_FS_PUBLIC
=
/nomad/fairdi/migration/fs/public
export
NOMAD_FS_TMP
=
/nomad/fairdi/migration/fs/tmp
export
NOMAD_FS_TMP
=
/nomad/fairdi/migration/fs/tmp
export
NOMAD_CELERY_ROUTING
=
worker
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