Hi Jaroslav,

Am Donnerstag, 6. März 2014, 06:44:22 schrieb Jaroslav Lukesh:
> does somebody have script to locate (and delete) unaccessed files (not 
> viewed from some date) in the ZoDB tree with webserver log?

this is a confusing question. What do you mean with" files in the ZODB"? File 
objects? The ZODB only consists of "objects" - not files even when they are 
shown like "files" over HTTP, DAV or FTP.

I think you are targeting a confusing way of solution. If you really want to 
delete some objets from your ZODB if they are not "accessed" over a time i 
would suggest the following solution:

 - if your object type does not provide an "last access" timestamp property or 
similiar in a way you need it ("access" in such a context could do mean a lot 
of different things in zope) you may add such an property to that objects and 
write a method which is proxying access to that objects (i.e. deliver it out 
over web) and updates that property to current time(stamp)/datetime.

 - write a simple method / Python Script / External Method which recursively 
looks for objects (i.e. of the regarding type) with your timestamp property 
and compare with current date. If the property is "to old" let delete or do 
whatever with em.

I'm nearly to shure that no one has a script working as you described here for 
such a job, because access to the logfiles plus log data conversion would be 
much more difficult and could not be used in such a more general way.

good luck.

 Niels Dettenbach
 Syndicat IT & Internet
 PGP: https://syndicat.com/pub_key.asc

Attachment: signature.asc
Description: This is a digitally signed message part.

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to