This document is for an old release of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.

galaxy.work package


galaxy.work.context module

class galaxy.work.context.WorkRequestContext(app, user=None, history=None, workflow_building_mode=False)[source]

Bases: galaxy.managers.context.ProvidesAppContext, galaxy.managers.context.ProvidesUserContext, galaxy.managers.context.ProvidesHistoryContext

Stripped down implementation of Galaxy web transaction god object for work request handling outside of web threads - uses mix-ins shared with GalaxyWebTransaction to provide app, user, and history context convience methods - but nothing related to HTTP handling, mako views, etc….

Things that only need app shouldn’t be consuming trans - but there is a need for actions potentially tied to users and histories and hopefully this can define that stripped down interface providing access to user and history information - but not dealing with web request and response objects.

__init__(app, user=None, history=None, workflow_building_mode=False)[source]

Return the current user if logged in or None.


Set the current user.


Return the current user if logged in or None.