[Zope] Product event when zope restarts

Tino Wildenhain tino@wildenhain.de
Thu, 10 May 2001 16:51:15 +0200


Hi Jan,

what about using stat() on the file to check if it has changed and
reread in that event? Make sure you reread only for the current
access.

Regards
Tino

--On Donnerstag, 10. Mai 2001 16:40 +0300 Jan <jan@itmeedia.ee> wrote:

>> Have you looked at the ExtFile object?
>>
>> cheers,
>>
>> Chris
> Yes. As I wrote, the product BASICALLY does this. Actually it reads the
> file, parses it and shows it's contents in the properties tab. When I
> write something like <dtml-var "myProduct.property1"> then I can access a
> part of the file.
>
>>
>> > Jan wrote:
>> >
>> > Hello all!
>> >
>> > I have been developing a Zope Product that basically reads in a file
>> > and
> shows
>> > it in zope. The problem is that when the file is updated in file
>> > system,
> that
>> > is not updated in zope. I do not want it to read the file every time it
> is
>> > accessed in zope. Refreshing it every time the zope restarts seems to
>> > be
> the
>> > solution.
>> >
>> > So I was wondering if there is a function that will be executed when
> zope
>> > restarts.
>> >
>> > Thanx.
>>
>> _______________________________________________
>> Zope maillist  -  Zope@zope.org
>> http://lists.zope.org/mailman/listinfo/zope
>> **   No cross posts or HTML encoding!  **
>> (Related lists -
>>  http://lists.zope.org/mailman/listinfo/zope-announce
>>  http://lists.zope.org/mailman/listinfo/zope-dev )
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )