From b6ac5f5c66532e6f8825217344a4b04a20120814 Mon Sep 17 00:00:00 2001 From: Diane Trout Date: Wed, 18 May 2011 16:49:33 -0700 Subject: [PATCH] Write the librdf model database somewhere other than /tmp It should be made configurable at some point. --- extra/ucsc_encode_submission/encode_find.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/extra/ucsc_encode_submission/encode_find.py b/extra/ucsc_encode_submission/encode_find.py index df51119..3ac4f04 100644 --- a/extra/ucsc_encode_submission/encode_find.py +++ b/extra/ucsc_encode_submission/encode_find.py @@ -17,6 +17,8 @@ import urllib from htsworkflow.util import api +DBDIR = os.path.expanduser("~diane/proj/submission") + logger = logging.getLogger("encode_find") libraryNS = RDF.NS("http://jumpgate.caltech.edu/library/") @@ -109,7 +111,8 @@ def get_model(model_name=None): if model_name is None: storage = RDF.MemoryStorage() else: - storage = RDF.HashStorage(model_name, options="hash-type='bdb',dir='/tmp'") + storage = RDF.HashStorage(model_name, + options="hash-type='bdb',dir='{0}'".format(DBDIR)) model = RDF.Model(storage) return model @@ -230,7 +233,7 @@ def update_submission_detail(model, subUrn, status, recent_update, cookie): logging.info("Adding status node to {0}".format(subUrn)) status_blank = RDF.Node() add_stmt(model, subUrn, HasStatusN, status_blank) - add_stmt(model, status_blank, rdfs['type'], StatusT) + add_stmt(model, status_blank, rdfsNS['type'], StatusN) add_stmt(model, status_blank, StatusN, status) add_stmt(model, status_blank, LastModifyN, recent_update) update_ddf(model, subUrn, status_blank, cookie=cookie) -- 2.30.2