[MOBY-guts] biomoby commit

Eddie Kawas kawas at dev.open-bio.org
Wed Aug 15 19:39:37 UTC 2007


kawas
Wed Aug 15 15:39:36 EDT 2007
Update of /home/repository/moby/moby-live/Perl/scripts
In directory dev.open-bio.org:/tmp/cvs-serv9029

Modified Files:
	ValidateService service_tester.pl 
Log Message:
getting the directory to read/write test results to from mobycentral.conf
moby-live/Perl/scripts ValidateService,1.1,1.2 service_tester.pl,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/scripts/ValidateService,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Perl/scripts/ValidateService	2007/08/14 23:29:28	1.1
+++ /home/repository/moby/moby-live/Perl/scripts/ValidateService	2007/08/15 19:39:36	1.2
@@ -12,9 +12,13 @@
 use strict;
 use CGI qw/:standard/;
 use XML::LibXML;
+use MOBY::Config;
+
 
 #here we put path to the isAlive.xml created by the test script
-my $PATH = '/path/to/isAliveStats.xml';
+my $CONF  = MOBY::Config->new;
+my $PATH = $CONF->{mobycentral}->{service_tester_path} || '/tmp/';
+$PATH = $PATH . '/isAliveStats.xml';
 
 my $form = new CGI;
 use Data::Dumper;

===================================================================
RCS file: /home/repository/moby/moby-live/Perl/scripts/service_tester.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Perl/scripts/service_tester.pl	2007/08/14 23:29:57	1.1
+++ /home/repository/moby/moby-live/Perl/scripts/service_tester.pl	2007/08/15 19:39:36	1.2
@@ -16,9 +16,9 @@
 # 	TIMEOUT 		- the timeout in seconds to wait for each service
 #	THREAD_COUNT 	- the number of workers that will call services
 #	CATEGORIES		- the moby service categories to test
-#	URL				- the registry endpoint
-#	URI				- the registry namespace
-#
+#	URL				- the registry endpoint <optional>
+#	URI				- the registry namespace <optional>
+#   DIRECTORY		- the place to store details between jobs <optional>
 #
 # IMPORTANT NOTE:
 # This script currently does not run on windows because of the 
@@ -31,13 +31,14 @@
 use strict;
 use warnings;
 
+use MOBY::Config;
 use MOBY::Client::Central;
 use SOAP::Lite;
 use XML::LibXML;
 # Because of this library, cannot run on windows
 use IPC::Shareable;
 
-######------GLOBAL VARIABLES------######
+######-------USER CONFIGURABLE PARAMETERS-------######
 # how long in seconds to wait for a service to respond
 my $TIMEOUT = 50;
 
@@ -47,18 +48,24 @@
 # the categories of services to ping
 my @CATEGORIES = qw / moby /;
 
+######-------------------------------------------######
+
 # the registry to query
-my $URL = 'http://mobycentral.icapture.ubc.ca/cgi-bin/MOBY05/mobycentral.pl';
-my $URI = 'http://mobycentral.icapture.ubc.ca/MOBY/Central';
+my $URL = $ENV{MOBY_SERVER} || 'http://mobycentral.icapture.ubc.ca/cgi-bin/MOBY05/mobycentral.pl';
+my $URI = $ENV{MOBY_URI} || 'http://mobycentral.icapture.ubc.ca/MOBY/Central';
 #$URL = 'http://bioinfo.icapture.ubc.ca/cgi-bin/mobycentral/MOBY-Central.pl';
 #$URI = 'http://bioinfo.icapture.ubc.ca/MOBY/Central';
 
+# The directory to store the job details
+my $CONF  = MOBY::Config->new;
+my $DIRECTORY = $CONF->{mobycentral}->{service_tester_path} || '/tmp/';
+
 # hashes whose key is the service provider and the value is an array of service names
 my %ALIVE     = ();
 my $FILENAME  = 'isAliveStats.xml';
-my $DIRECTORY = '/home/ekawas/'; # TODO put this into mobyconfig.conf ???
 
-######------END GLOBAL VARS ------######
+
+
 
 # create some shared variables
 my $alive_handle = tie %ALIVE, 'IPC::Shareable', undef, { destroy => 'yes' };




More information about the MOBY-guts mailing list