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
0d6d06c0
Commit
0d6d06c0
authored
9 years ago
by
John Chilton
Browse files
Options
Downloads
Patches
Plain Diff
Rework run-as-real to work when installed via pip.
parent
e97a95a0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pulsar/managers/queued_external_drmaa.py
+25
-3
25 additions, 3 deletions
pulsar/managers/queued_external_drmaa.py
setup.py
+3
-0
3 additions, 0 deletions
setup.py
with
28 additions
and
3 deletions
pulsar/managers/queued_external_drmaa.py
+
25
−
3
View file @
0d6d06c0
...
...
@@ -5,6 +5,8 @@ from .base.base_drmaa import BaseDrmaaManager
from
.util.sudo
import
sudo_popen
from
..managers
import
status
from
galaxy.tools.deps.commands
import
which
from
logging
import
getLogger
log
=
getLogger
(
__name__
)
...
...
@@ -21,9 +23,9 @@ class ExternalDrmaaQueueManager(BaseDrmaaManager):
def
__init__
(
self
,
name
,
app
,
**
kwds
):
super
(
ExternalDrmaaQueueManager
,
self
).
__init__
(
name
,
app
,
**
kwds
)
self
.
chown_working_directory_script
=
kwds
.
get
(
'
chown_working_directory_script
'
,
DEFAULT_CHOWN_WORKING_DIRECTORY_SCRIPT
)
self
.
drmaa_kill_script
=
kwds
.
get
(
'
drmaa_kill_script
'
,
DEFAULT_DRMAA_KILL_SCRIPT
)
self
.
drmaa_launch_script
=
kwds
.
get
(
'
drmaa_launch_script
'
,
DEFAULT_DRMAA_LAUNCH_SCRIPT
)
self
.
chown_working_directory_script
=
_handle_default
(
kwds
.
get
(
'
chown_working_directory_script
'
,
None
),
"
chown_working_directory
"
)
self
.
drmaa_kill_script
=
_handle_default
(
kwds
.
get
(
'
drmaa_kill_script
'
,
None
),
"
drmaa_kill
"
)
self
.
drmaa_launch_script
=
_handle_default
(
kwds
.
get
(
'
drmaa_launch_script
'
,
None
),
"
drmaa_launch
"
)
self
.
production
=
kwds
.
get
(
'
production
'
,
"
true
"
).
lower
()
!=
"
false
"
self
.
reclaimed
=
{}
self
.
user_map
=
{}
...
...
@@ -82,3 +84,23 @@ class ExternalDrmaaQueueManager(BaseDrmaaManager):
stdout
,
stderr
=
p
.
communicate
()
assert
p
.
returncode
==
0
,
"
%s, %s
"
%
(
stdout
,
stderr
)
return
stdout
def
_handle_default
(
value
,
script_name
):
"""
There are two potential variants of these scripts,
the Bash scripts that are meant to be run within PULSAR_ROOT
for older-style installs and the binaries created by setup.py
as part of a proper pulsar installation.
This method first looks for the newer style variant of these
scripts and returns the full path to them if needed and falls
back to the bash scripts if these cannot be found.
"""
if
value
:
return
value
installed_script
=
which
(
"
pulsar-%s
"
%
script_name
.
replace
(
"
_
"
,
"
-
"
))
if
installed_script
:
return
installed_script
else
:
return
"
scripts/%s.bash
"
%
script_name
This diff is collapsed.
Click to expand it.
setup.py
+
3
−
0
View file @
0d6d06c0
...
...
@@ -89,6 +89,9 @@ setup(
pulsar-main=pulsar.main:main
pulsar-check=pulsar.client.test.check:main
pulsar-config=pulsar.scripts.config:main
pulsar-drmaa-launch=pulsar.scripts.drmaa_launch:main
pulsar-drmaa-kill=pulsar.scripts.drmaa_kill:main
pulsar-chown-working-directory=pulsar.scripts.chown_working_directory:main
'''
,
scripts
=
scripts
,
package_data
=
{
'
pulsar
'
:
[
...
...
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