Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a global DRMAA session #97

Merged
merged 4 commits into from
Apr 7, 2016

Conversation

natefoo
Copy link
Member

@natefoo natefoo commented Apr 6, 2016

Only one active DRMAA session is possible per process. This allows multiple Galaxy runner plugins to be active in the same handler if Pulsar is being used as an embedded runner (they all have to target the same DRMAA library, however). Also add locking to calls that modify the number of active jobs, as per the Python-drmaa documentation.

See also galaxyproject/galaxy#2102

per process) so multiple runner plugins can be active in the same runner
(they all have to target the same DRMAA library, however). Also add
locking to calls that modify the number of active jobs, as per the
Python-drmaa documentation.
@natefoo
Copy link
Member Author

natefoo commented Apr 6, 2016

@jmchilton if the DrmaaSession is set up in some different way for the tests and I've broken it (perhaps by changing the the session constructor to be passed in uncalled?) I can't find where. Everything works when you actually run Galaxy (I didn't test a standalone Pulsar).

log.debug("Initializing DRMAA session from thread %s", threading.current_thread().name)
DrmaaSession.session = session_constructor()
DrmaaSession.session.initialize()
DrmaaSession.session_count += 1
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to move up one level right? Otherwise it will only ever be 1.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes 😦

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 75.743% when pulling d815cc8 on natefoo:global-drmaa-session into 251a418 on galaxyproject:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 75.762% when pulling 76080da on natefoo:global-drmaa-session into 251a418 on galaxyproject:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 75.635% when pulling 5b0d743 on natefoo:global-drmaa-session into 251a418 on galaxyproject:master.

@natefoo natefoo merged commit 68cbb96 into galaxyproject:master Apr 7, 2016
@jmchilton jmchilton mentioned this pull request Apr 10, 2016
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants