[open-ils-commits] r837 - conifer/branches/rel_1_6_0/tools/daily-scripts (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Mar 17 17:53:32 EDT 2010
Author: dbs
Date: 2010-03-17 17:53:26 -0400 (Wed, 17 Mar 2010)
New Revision: 837
Added:
conifer/branches/rel_1_6_0/tools/daily-scripts/test_eg_services.pl
Log:
First cut at an extremely stupid script to ensure that services actually respond to requests
We were burned by a service that looked fine in the ps listing - had a
controller, master, listener, and drone - but which was not responding to
requests. NEVER AGAIN!
Added: conifer/branches/rel_1_6_0/tools/daily-scripts/test_eg_services.pl
===================================================================
--- conifer/branches/rel_1_6_0/tools/daily-scripts/test_eg_services.pl (rev 0)
+++ conifer/branches/rel_1_6_0/tools/daily-scripts/test_eg_services.pl 2010-03-17 21:53:26 UTC (rev 837)
@@ -0,0 +1,48 @@
+#/usr/bin/perl
+use strict;
+use OpenSRF::AppSession;
+use OpenSRF::System;
+
+OpenSRF::System->bootstrap_client(config_file => '/openils/conf/opensrf_core.xml');
+
+my @services = qw{
+ opensrf.settings
+ opensrf.math
+ opensrf.dbmath
+ open-ils.acq
+ open-ils.cat
+ open-ils.supercat
+ open-ils.search
+ open-ils.circ
+ open-ils.actor
+ open-ils.auth
+ open-ils.storage
+ open-ils.penalty
+ open-ils.cstore
+ open-ils.collections
+ open-ils.ingest
+ open-ils.reporter
+ open-ils.reporter-store
+ open-ils.permacrud
+ open-ils.pcrud
+ open-ils.trigger
+ open-ils.fielder
+ open-ils.vandelay
+ open-ils.resolver
+};
+
+foreach my $service (@services) {
+ check_service($service);
+}
+
+sub check_service {
+ my $service = shift;
+ my $session = OpenSRF::AppSession->create($service);
+ my $request = $session->request("opensrf.system.echo", "All is well");
+ if ($request && $request->gather() eq "All is well") {
+ print "$service: All is well\n";
+ } else {
+ print "$service: FAIL\n";
+ }
+}
+
More information about the open-ils-commits
mailing list