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
024f52a4
Commit
024f52a4
authored
6 years ago
by
Markus Scheidgen
Browse files
Options
Downloads
Patches
Plain Diff
Added auxfile cutoff.
parent
8f096ccb
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!33
Merge version 0.4.0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
nomad/config.py
+6
-0
6 additions, 0 deletions
nomad/config.py
nomad/files.py
+9
-1
9 additions, 1 deletion
nomad/files.py
with
15 additions
and
1 deletion
nomad/config.py
+
6
−
0
View file @
024f52a4
...
@@ -141,3 +141,9 @@ mail = MailConfig(
...
@@ -141,3 +141,9 @@ mail = MailConfig(
console_log_level
=
get_loglevel_from_env
(
'
NOMAD_CONSOLE_LOGLEVEL
'
,
default_level
=
logging
.
WARNING
)
console_log_level
=
get_loglevel_from_env
(
'
NOMAD_CONSOLE_LOGLEVEL
'
,
default_level
=
logging
.
WARNING
)
service
=
os
.
environ
.
get
(
'
NOMAD_SERVICE
'
,
'
unknown nomad service
'
)
service
=
os
.
environ
.
get
(
'
NOMAD_SERVICE
'
,
'
unknown nomad service
'
)
release
=
os
.
environ
.
get
(
'
NOMAD_RELEASE
'
,
'
devel
'
)
release
=
os
.
environ
.
get
(
'
NOMAD_RELEASE
'
,
'
devel
'
)
auxfile_cutoff
=
30
"""
Number of max auxfiles. More auxfiles means no auxfiles, but probably a directory of many
mainfiles.
"""
This diff is collapsed.
Click to expand it.
nomad/files.py
+
9
−
1
View file @
024f52a4
...
@@ -570,8 +570,16 @@ class StagingUploadFiles(UploadFiles):
...
@@ -570,8 +570,16 @@ class StagingUploadFiles(UploadFiles):
mainfile_basename
=
os
.
path
.
basename
(
mainfile
)
mainfile_basename
=
os
.
path
.
basename
(
mainfile
)
calc_dir
=
os
.
path
.
dirname
(
mainfile_object
.
os_path
)
calc_dir
=
os
.
path
.
dirname
(
mainfile_object
.
os_path
)
calc_relative_dir
=
calc_dir
[
len
(
self
.
_raw_dir
.
os_path
)
+
1
:]
calc_relative_dir
=
calc_dir
[
len
(
self
.
_raw_dir
.
os_path
)
+
1
:]
ls
=
os
.
listdir
(
calc_dir
)
if
len
(
ls
)
>
config
.
auxfile_cutoff
:
# If there are two many of them, its probably just a directory with lots of
# calculations. In this case it does not make any sense to provide thousands of
# aux files.
return
[
mainfile
]
if
with_mainfile
else
[]
aux_files
=
sorted
(
aux_files
=
sorted
(
os
.
path
.
join
(
calc_relative_dir
,
path
)
for
path
in
os
.
listdir
(
calc_dir
)
os
.
path
.
join
(
calc_relative_dir
,
path
)
for
path
in
ls
if
os
.
path
.
isfile
(
os
.
path
.
join
(
calc_dir
,
path
))
and
path
!=
mainfile_basename
)
if
os
.
path
.
isfile
(
os
.
path
.
join
(
calc_dir
,
path
))
and
path
!=
mainfile_basename
)
if
with_mainfile
:
if
with_mainfile
:
return
[
mainfile
]
+
aux_files
return
[
mainfile
]
+
aux_files
...
...
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