예제 #1
0
파일: api.py 프로젝트: sean-lockwood/crds
def get_remote_context(observatory, pipeline_name):
    """Get the name of the default context last pushed from `pipeline_name` and
    presumed to be operational.
    """
    try:
        return S.get_remote_context(observatory, pipeline_name)
    except Exception as exc:
        raise CrdsRemoteContextError(
            "Server error resolving context in use by pipeline",
            (observatory, pipeline_name)) from exc
예제 #2
0
파일: api.py 프로젝트: sean-lockwood/crds
def push_remote_context(observatory, kind, key, context):
    """Upload the specified `context` of type `kind` (e.g. "operational") to the
    server,  informing the server of the actual configuration of the local cache
    for critical systems like pipelines,  not average users.   This lets the server
    display actual versus commanded (Set Context) operational contexts for a pipeline.
    """
    try:
        return S.push_remote_context(observatory, kind, key, context)
    except Exception as exc:
        raise CrdsRemoteContextError(
            "Server error setting pipeline context",
            (observatory, kind, key, context)) from exc