Hi,
one of the things that the scripting language wps hooks are still not
very useful at is long running processes that might have to be run
in asynch mode, the ScriptProcess class receives a ProgressListener,
but it is not passed down to the script.
I would like to add this possibility, for starters, by extending the WPSHook.run
to get the ProgressListener, and leave the implementations free to make use of it.
In particular for the Python implementation I guess we could have the script
just get the ProgressListener object, and interact with it directly, no?
Alternatively, we could wrap it to make it more pythonic/simple (open to
suggestions here).
However… how do we expose that the execution method supports it?
Unlike Java, we cannot recognize the progress listener by the argument type.
I guess we could make it one of the inputs?
@process(
…
inputs={‘arg1’: (, ‘Arg1 description’),
‘arg2’: (, ‘Arg2 description’)}
‘arg3:’ (ProgressListener, 'The progress listener)}
)
Or else, we could have it be declared as a top level thing:
@process(
…
inputs = {…}
outputs = { … }
listener = ‘argName’
}
Ah, while I’m at it, another thing I want to check. What if the computation
is python finds some issue, we want to exit throwing a descriptive exception,
I guess all there is to it is to call inside the script:
raise Exception(‘My long winded explanation here’)
Right?
Cheers
Andrea
–
==
Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it