Ticket #112 (new defect) — at Version 1

Opened 9 years ago

Last modified 9 years ago

Status file location error on long processes

Reported by: espen Owned by:
Priority: major Milestone:
Component: Development platform Version:
Keywords: Cc:

Description (last modified by djay) (diff)

When a program specified as the "serviceProvider" in the service configuration is located in another folder than the current working directory, the filename of the status file will be wrong. It looks like the generated status filename will be created on the form: $main_conf['main']['tmpPath'] + serviceProvider +'_' + sid +'.xml'.

This will cause problems because the folder do not exist.

Ex:

[serviceName]
serviceProvider = c:/zoo/php/script/foo.php

The service folder is:

$main_conf['main']['tmpPath'] = c:/zoo/wps/status

The status file will be something like:

c:/zoo/wps/status/c:/zoo/php/script/foo.php_XXXX.xml

To use the "service name" instead of serviceProvider as status file name will probably solve this issue.

Change History

Changed 9 years ago by djay

  • description modified (diff)

Dear Espen, sorry for late reply but it took long time for me to understand the issue.

In fact I did not know that it was possible (prior to r586) to specify a full path for the service location. And in fact looking on how other languages works not really acceptable. Indeed this lead to produce a rong status file name but I guess it is not the only issue which may happen.

I give a better look into the PHP support implementation yesterday and commited the result of this work in r586. So for now, the php file should be located in the same directory as the ZOO-Kernel itself or in sub-directory. In case a sub-directory then the service name will change automatically for being prefixed by the sub-directory name. For instance, if you place the orfeo toolbox services in a sub-directory named OTB (so located in your /cgi-bin/ directory where your ZOO-Kernel stand) then the service name will be OTB.ServiceName.

For instance, with the current PHP hello service, you can do the following to deploy your service:

mkdir /usr/lib/cgi-bin/php
co hello-php/cgi-env/* /usr/lib/cgi-bin/php

This will lead to the following service name php.HelloPHP.

With the restrictions implied by the new version of the PHP support this problem should be solved.

As you spoken about background service execution I also added a ZOO-API for the PHP language giving you access (amongst other things) to the updateStatus function which can be called to inform the ZOO-Kernel about the current step run by your service and its progress. Please, refer to this page for more informations on the PHP ZOO-API.

I hope you can confirm that the revision r586 solves your problem.

Note: See TracTickets for help on using tickets.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png