Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Pulsar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
NDIP
Pulsar
Commits
1017bc5e
Commit
1017bc5e
authored
9 years ago
by
Nate Coraor
Browse files
Options
Downloads
Patches
Plain Diff
Add a job manager for XSEDE jobs (runs the user count script after
submission).
parent
ad229a5e
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
pulsar/managers/queued_drmaa_xsede.py
+48
-0
48 additions, 0 deletions
pulsar/managers/queued_drmaa_xsede.py
with
48 additions
and
0 deletions
pulsar/managers/queued_drmaa_xsede.py
0 → 100644
+
48
−
0
View file @
1017bc5e
from
subprocess
import
check_call
,
Popen
,
PIPE
,
CalledProcessError
from
.queued_drmaa
import
DrmaaQueueManager
import
logging
log
=
logging
.
getLogger
(
__name__
)
class
XsedeDrmaaQueueManager
(
DrmaaQueueManager
):
"""
DRMAA backed queue manager for XSEDE (to run the XSEDE job/user reporting
script after submission).
TODO: A generalized callback framework for executing things at various
points in the job lifecycle.
"""
manager_type
=
"
queued_drmaa_xsede
"
def
launch
(
self
,
job_id
,
command_line
,
submit_params
=
{},
dependencies_description
=
None
,
env
=
[]):
super
(
XsedeDrmaaQueueManager
,
self
).
launch
(
job_id
,
command_line
,
submit_params
=
submit_params
,
dependencies_description
=
dependencies_description
,
env
=
env
)
try
:
check_call
([
'
gateway_submit_attributes
'
,
'
-gateway_user
'
,
submit_params
.
get
(
'
user_email
'
,
'
unknown@galaxyproject.org
'
),
'
-submit_time
'
,
check_output
([
'
date
'
,
'
+%F %T %:z
'
]).
strip
(),
'
-jobid
'
,
self
.
_external_ids
[
job_id
]
])
except
(
OSError
,
IOError
,
CalledProcessError
)
as
exc
:
log
.
exception
(
'
Failed to call gateway_submit_attributes:
'
)
def
check_output
(
args
):
"""
Pipe-safe (and 2.6 compatible) version of subprocess.check_output
"""
proc
=
Popen
(
args
,
stdout
=
PIPE
)
out
=
proc
.
communicate
()[
0
]
if
proc
.
returncode
:
raise
CalledProcessError
(
proc
.
returncode
,
args
,
output
=
out
)
return
out
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