From: Brandon King Date: Wed, 10 Jun 2009 17:53:51 +0000 (+0000) Subject: Moved hardcoded URL to it's proper place in the settings.py. X-Git-Tag: 0.2.0.6~1 X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=76c5e2b46281966657003eece8098d71953a4015 Moved hardcoded URL to it's proper place in the settings.py. * Supports Diane's config file feature. =o) --- diff --git a/htsworkflow/frontend/settings.py b/htsworkflow/frontend/settings.py index 9986f79..d971bbc 100644 --- a/htsworkflow/frontend/settings.py +++ b/htsworkflow/frontend/settings.py @@ -54,7 +54,8 @@ options = ConfigParser.SafeConfigParser( 'database_name': os.path.abspath('/htsworkflow/htswfrontend/dev_fctracker.db'), 'time_zone': 'America/Los_Angeles', - 'default_pm': '5' + 'default_pm': '5', + 'link_flowcell_storage_device_url': "http://localhost:8000/inventory/lts/link/" }) options.read([os.path.expanduser("~/.htsworkflow.ini"), @@ -169,3 +170,6 @@ options_to_dict(ALLOWED_ANALYS_IPS, 'allowed_analysis_hosts') #UPLOADTO_ELAND_RESULT_PACKS = os.path.join(UPLOADTO_HOME, 'eland_results') #UPLOADTO_BED_PACKS = os.path.join(UPLOADTO_HOME, 'bed_packs') RESULT_HOME_DIR='/Users/diane/proj/solexa/results/flowcells' + +LINK_FLOWCELL_STORAGE_DEVICE_URL = options.get('frontend', 'link_flowcell_storage_device_url') + diff --git a/scripts/mark_archived_data b/scripts/mark_archived_data index e760318..80c6792 100755 --- a/scripts/mark_archived_data +++ b/scripts/mark_archived_data @@ -4,6 +4,7 @@ #os.environ['DJANGO_SETTINGS_MODULE'] = 'htsworkflow.frontend.settings' from htsworkflow.util.hdquery import get_hd_serial_num +from htsworkflow.frontend import settings #from django.conf import settings from optparse import OptionParser @@ -11,8 +12,6 @@ from optparse import OptionParser import sys import urllib -#FIXME: Remove hard coded URL -HTSW_URL = "http://localhost:8000/inventory/lts/link/" def construct_parser(): """ @@ -32,7 +31,7 @@ def update_db(flowcell, serial): """ Creates link between flowcell and storage device over http """ - www = urllib.urlopen(HTSW_URL+'%s/%s/' % (flowcell, serial)) + www = urllib.urlopen(settings.LINK_FLOWCELL_STORAGE_DEVICE_URL+'%s/%s/' % (flowcell, serial)) httpcode = www.getcode() if httpcode != 200: print 'ERROR - HTTP OUTPUT:'