Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DCT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
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
graintracking
DCT
Commits
acdba3fa
Commit
acdba3fa
authored
11 years ago
by
Nicola Vigano
Browse files
Options
Downloads
Patches
Plain Diff
OAR/Python: disable monitoring if oar modules cannot be imported properly
Signed-off-by:
Nicola Vigano
<
nicola.vigano@esrf.fr
>
parent
27f19ce8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
zUtil_Python/dct_batch.py
+10
-1
10 additions, 1 deletion
zUtil_Python/dct_batch.py
with
10 additions
and
1 deletion
zUtil_Python/dct_batch.py
+
10
−
1
View file @
acdba3fa
...
...
@@ -12,7 +12,13 @@ import sys
import
dct_io_xml
import
dct_notification
from
oar
import
oar_utils
try
:
from
oar
import
oar_utils
oar_available
=
True
except
ImportError
as
exc
:
dct_io_xml
.
DCTOutput
.
printWarning
(
exc
)
print
(
"
Turning of OAR services
"
)
oar_available
=
False
class
DCTBatchConf
(
dct_io_xml
.
DCTXMLBase
):
...
...
@@ -168,6 +174,9 @@ class DCTBatch(object):
return
functions
def
monitor_array
(
self
,
array
,
delay
=
10
,
timeout
=
None
):
if
oar_available
is
not
True
:
raise
EnvironmentError
(
"
OAR service is not available!
"
)
monitor
=
oar_utils
.
OARMonitorArray
(
array
=
array
)
result
=
monitor
.
monitor
(
delay
=
delay
,
timeout
=
timeout
)
if
result
is
not
None
:
...
...
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