[Pywps-dev] database logging to pywps

Jorge Samuel Mendes de Jesus jorge.mendesdejesus at wur.nl
Fri Jan 8 00:11:03 PST 2016


Hi to all

Sorry for the late reply I was out of office/ house so no internet or
email allowed :(

I checked the sqlite code, looks nice just some comments

1)
if not in database:
    database=":memory:"

If  the database is running in memory we should send some reference to
the log file saying that we are running things in memory and therefore
consuming it. sqlite doesnt take much space but nevertheless should be
indicated.

2) Add the complete HTTP GET execute request to the log ??? Now it is
only operation=request.operation, for HTTP POST it could make the DB get
to big

2) SQLAlchemy

[1][2]

Last year I did a database project using SQLAlchemy/GeoAlchemy in the
beginning it was a bit strange/leaning curve but then it compensated
since the python code was better organized, and no needed changes
between different databases. Maybe in the future we could implement the
code using SQLAlchemy and then the log database being defined in the
configuration file (PostGresql, MySQL) etc)


Jorge

[1] http://www.sqlalchemy.org/
[2] http://docs.sqlalchemy.org/en/rel_1_0/orm/tutorial.html

On 31-12-15 10:12, Luís de Sousa wrote:
> Very nice, thanks for keep it going.
>
> Is there anything new to the install process? Or is the db bundled
> with the remainder of the code?
>
> Cheers,
>
> Luís
>
> On 31 December 2015 at 00:51, Jachym Cepicky <jachym.cepicky at gmail.com> wrote:
>> Hi,
>>
>> the logging functionality is now in master. In our sqlite database, we
>> should always be able to see *current* status of past and running processes,
>> when they started and ended, this needs to be totally tested, but I hope,
>> it's doing what it's supposed to do
>>
>> cheers
>>
>> J
>>
>> po 28. 12. 2015 v 22:39 odesílatel Jachym Cepicky <jachym.cepicky at gmail.com>
>> napsal:
>>> Hi all,
>>>
>>> today, I've introduced database logging capability for PyWPS-4  - first
>>> proof-of-concept version.
>>>
>>> Idea: to track current status, needed time, log message, percent done etc.
>>> for all requets (and use it later for automatic validation of each process,
>>> process pausing, resuming, ...)
>>>
>>> I've used (hardcoded) sqlite3 database for it, it still lives in separate
>>> branch (not in master, but in [1]), would be nice, if someone could have a
>>> short look on it [2]
>>>
>>> data stored:
>>>
>>> ['uuid', 'operation', 'version', 'time_start', 'time_end', 'identifier',
>>> 'message', 'percent_done', 'status']
>>>
>>> thanks
>>>
>>> J
>>>
>>> [1] https://github.com/jachym/pywps-4/tree/logging
>>> [2]
>>> https://github.com/jachym/pywps-4/commit/301516ae11cd5d51a3fefca0ca8e05e7163fbfbd
>>
>> _______________________________________________
>> pywps-dev mailing list
>> pywps-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/pywps-dev
> _______________________________________________
> pywps-dev mailing list
> pywps-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pywps-dev

-- 
ISRIC - World Soil Information 
Post: PO box 353, 6700 AJ, Wageningen,
The Netherlands Visiting Address: Droevendaalsesteeg 3, 6708 PB
Wageningen (Bdg. 101), 
Office: C.013 
Office Phone: +31 (0) 317 4 83715
Mobile Phone: +31 (0) 613 9 06950
Skype: jorge.de.jesus (Jorge Samuel Mendes de Jesus) 
OpenPGPKey: 0xA3D0065A



More information about the pywps-dev mailing list