Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
ni-meister-gedi-biomass-global
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
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
Ian
ni-meister-gedi-biomass-global
Commits
258a66b5
Commit
258a66b5
authored
2 months ago
by
Ian
Committed by
Ian
2 months ago
Browse files
Options
Downloads
Patches
Plain Diff
fix: propagate KeyboardInterrupt in Job and JobManager.submit()
parent
227157db
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
maap_utils/Job.py
+2
-0
2 additions, 0 deletions
maap_utils/Job.py
maap_utils/JobManager.py
+2
-0
2 additions, 0 deletions
maap_utils/JobManager.py
with
4 additions
and
0 deletions
maap_utils/Job.py
+
2
−
0
View file @
258a66b5
...
@@ -31,6 +31,8 @@ class Job:
...
@@ -31,6 +31,8 @@ class Job:
"""
Call a MAAP function, catch and log exceptions.
"""
"""
Call a MAAP function, catch and log exceptions.
"""
try
:
try
:
return
fn
(
*
args
,
**
kwargs
)
return
fn
(
*
args
,
**
kwargs
)
except
KeyboardInterrupt
:
raise
except
Exception
as
e
:
except
Exception
as
e
:
logging
.
error
(
f
"
MAAP API error in
{
fn
.
__name__
}
:
{
e
}
"
)
logging
.
error
(
f
"
MAAP API error in
{
fn
.
__name__
}
:
{
e
}
"
)
return
None
return
None
...
...
This diff is collapsed.
Click to expand it.
maap_utils/JobManager.py
+
2
−
0
View file @
258a66b5
...
@@ -54,6 +54,8 @@ class JobManager:
...
@@ -54,6 +54,8 @@ class JobManager:
job
.
submit
()
job
.
submit
()
self
.
ledger
.
add_job
(
job
)
self
.
ledger
.
add_job
(
job
)
job_batch_counter
+=
1
job_batch_counter
+=
1
except
KeyboardInterrupt
:
raise
except
Exception
as
e
:
except
Exception
as
e
:
logging
.
error
(
f
"
Error submitting job:
{
e
}
"
)
logging
.
error
(
f
"
Error submitting job:
{
e
}
"
)
continue
continue
...
...
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