Commit 7e320842 authored by ericw's avatar ericw
Browse files

At CERN, test the squid server

parent 1c2e9e0a
...@@ -10,7 +10,7 @@ Tests the local FroNtier squid ...@@ -10,7 +10,7 @@ Tests the local FroNtier squid
# 3) file $CMS_PATH/SITECONF/local/JobConfig/site-local-config.xml # 3) file $CMS_PATH/SITECONF/local/JobConfig/site-local-config.xml
# contains the location of the local FroNtier squid server # contains the location of the local FroNtier squid server
# #
__revision__ = "$Id: test_squid.py,v 1.11 2007/03/02 17:09:03 ericw Exp $" __revision__ = "$Id: test_squid.py,v 1.12 2007/03/12 19:08:00 ericw Exp $"
import os import os
import sys import sys
import urllib2 import urllib2
...@@ -91,11 +91,19 @@ if site != "CERN": ...@@ -91,11 +91,19 @@ if site != "CERN":
print "squid " + squid print "squid " + squid
os.environ["http_proxy"] = squid os.environ["http_proxy"] = squid
# #
# Following code from Sinisa Veseli # Set server for urllib2
# Note that the squid server used on the CERN site is
# http://cmsfrontier.cern.ch:8000
#
if site != "CERN":
frontierUrl = "http://cmsfrontier.cern.ch:8080/FrontierInt/Frontier"
else:
frontierUrl = "http://cmsfrontier.cern.ch:8000/FrontierInt/Frontier"
#
# Much of the following code is from Sinisa Veseli
# #
# Set parameters # Set parameters
# #
frontierUrl = "http://cmsfrontier.cern.ch:8080/FrontierInt/Frontier"
frontierQuery = "SELECT 1 FROM DUAL" frontierQuery = "SELECT 1 FROM DUAL"
decodeFlag = True decodeFlag = True
refreshFlag = True refreshFlag = True
...@@ -138,7 +146,8 @@ queryStart = time.localtime() ...@@ -138,7 +146,8 @@ queryStart = time.localtime()
if statsFlag: if statsFlag:
pass pass
else: else:
print "\nQuery started: ", time.strftime("%m/%d/%y %H:%M:%S %Z", queryStart) print "\nQuery started: ", \
time.strftime("%m/%d/%y %H:%M:%S %Z",queryStart)
t1 = time.time() t1 = time.time()
# #
try: try:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment