[MOBY-guts] biomoby commit

José Manuel Rodríguez Carrasco jmrc at dev.open-bio.org
Fri Aug 29 14:16:02 UTC 2008


jmrc
Fri Aug 29 10:16:02 EDT 2008
Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async
In directory dev.open-bio.org:/tmp/cvs-serv18741/Perl/MOBY-Server/lib/MOBY/Async

Modified Files:
	WSRF.pm 
Log Message:
*	Directory where temporal results from async services are saved
	is not hard-coded any more. Now it depends on TMPDIR environment
	variable.

moby-live/Perl/MOBY-Server/lib/MOBY/Async WSRF.pm,1.4,1.5
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async/WSRF.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async/WSRF.pm	2008/08/18 15:52:17	1.4
+++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async/WSRF.pm	2008/08/29 14:16:02	1.5
@@ -36,7 +36,8 @@
 $WSRF::WSRP::MobyPrivatePrefixes    = ['pid', 'input'];
 $WSRF::WSRP::MobyPropertiesPrefixes = ['status', 'result'];
 
-$WSRF::Constants::Data  = '/tmp/moby_';
+$WSRF::Constants::DataDir  = (exists($ENV{TMPDIR}) && defined($ENV{TMPDIR}) && $ENV{TMPDIR} ne '')?$ENV{TMPDIR}:'/tmp';
+$WSRF::Constants::DataPrefix  = 'moby_';
 $WSRF::Constants::MOBY  = 'http://biomoby.org/';
 $WSRF::Constants::MOBY_MESSAGE_NS  = 'http://www.biomoby.org/moby';
 #$WSRF::Constants::WSA   = 'http://www.w3.org/2005/08/addressing';
@@ -413,7 +414,7 @@
 	my $self = shift @_;
 	my $envelope = pop @_;
 	my $lock = WSRF::MobyFile->new($envelope);
-	my $file = $WSRF::Constants::Data.$lock->ID();
+	my $file = $WSRF::Constants::DataDir . '/' . $WSRF::Constants::DataPrefix.$lock->ID();
 	unlink $file or WSRF::BaseFaults::die_with_fault( $envelope, (
 		BaseFault   => "ResourceNotDestroyedFault",
 		Description => "Could not remove WS-Resource file"
@@ -619,7 +620,7 @@
 	$ID_clipped =~ s/-\w*//o;
 	
 	# File containing resource properties
-	my $path = $WSRF::Constants::Data.$ID_clipped;
+	my $path = $WSRF::Constants::DataDir . '/' . $WSRF::Constants::DataPrefix.$ID_clipped;
 	WSRF::BaseFaults::die_with_fault( $envelope, (
 		BaseFault   => "ResourceUnknownFault",
 		Description => "No WS-Resource with Identifer $ID"




More information about the MOBY-guts mailing list