[Zope] accelerating Zope restart

2006-08-31 Thread egf05
Hi,

My Data.fs is huge (21GB) because it contains many video files. This is not a
problem in itself, however, I recently had to reboot my machine and now zope
takes around 20-30 minutes to restart. Is a fstest automatically done ? How
could I accelerate the restarting, if possible ? 

Thanks a lot for any advice,
Eric
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] accelerating Zope restart

2006-08-31 Thread egf05
 Zope does maintain a Data.fs.index file. If it becomes corrupt e.g. through 
 an unclean shutdown then Zope will recreate it by scanning the whole 
 Data.fs file when starting Zope the next time. This will take some 
 timeso before rebooting you should shutdown down your Zope properly.
 
 -aj

OK, thanks.

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


Re: [Zope] accelerating Zope restart

2006-08-31 Thread egf05
 
 Zope does maintain a Data.fs.index file. If it becomes corrupt e.g. through 
 an unclean shutdown then Zope will recreate it by scanning the whole 
 Data.fs file when starting Zope the next time. This will take some 
 timeso before rebooting you should shutdown down your Zope properly.
 

OK, I have two questions about shutting down zope:

- To cleanly shut down zope daemon, is zopectl stop enough ?

- If zope runs in the foreground, how to shut it down cleanly ? CTRL+C won't do
it I guess ?

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


[Zope] Problem with Batch search

2006-08-18 Thread egf05
Hi,

I think I found a bug in the automatically generated Z Search Forms, as
described in the manual (16-4: Creating a search form for a ZCatalog). This
creates two files: SearchForm and SearchReport. SearchReport uses this method:

batch python:modules['ZTUtils'].Batch(results, size=20, start=start);

and then displays only 20 object rids per page. If it finds for instance 31
object, It gives a link to the Next 11 results. However, this is where it is
broken. Clicking on the link leads to have ALL objects in the catalog being
displayed. It now offers Previous 20 results / Next 20 results and you can
display all objects.

Is it a problem in Batch? or a bug in the SearchReport Page Template?

Thank you,
Eric

PS: This are the generated SearchReport Template:
htmlbody
html
  body tal:define=results  here/catalog;
start request/start|python:0;
batch python:modules['ZTUtils'].Batch(results, 
  size=20, 
  start=start);
previous python:batch.previous;
next python:batch.next

  p
a tal:condition=previous
   tal:attributes=href string:${request/URL0}?start:int=${previous/first}
   href=previous_urlprevious span
tal:replace=previous/length20/span results/a
a tal:condition=next
   tal:attributes=href string:${request/URL0}?start:int=${next/first}
   href=next_urlnext span tal:replace=next/length20/span 
results/a
  /p

  table border
tr
  thData record id /th
/tr
   
  tal:x repeat=result batch 
  
 tr
  tdspan tal:replace=result/data_record_id_data_record_id_ goes
here/span/td
/tr

  /tal:x

  /table
  p
a tal:condition=previous
   tal:attributes=href string:${request/URL0}?start:int=${previous/first}
   href=previous_urlprevious span
tal:replace=previous/length20/span results/a
a tal:condition=next
   tal:attributes=href string:${request/URL0}?start:int=${next/first}
   href=next_urlnext span tal:replace=next/length20/span 
results/a
  /p

  /body
/html

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


Re: [Zope] Problem with Batch search

2006-08-18 Thread egf05
Selon [EMAIL PROTECTED]:

 Hi,
 
 I think I found a bug in the automatically generated Z Search Forms, as
 described in the manual (16-4: Creating a search form for a ZCatalog). This
 creates two files: SearchForm and SearchReport. SearchReport uses this
 method:

I answer to myself because I think I found the rpoblem. The problem is that when
going to the next page, the query is not copied into the URL.
I corrected this way:

body tal:define=results  here/catalog;
start request/start|python:0;
batch python:modules['ZTUtils'].Batch(results,
  size=20,
  start=start);
previous python:batch.previous;
next python:batch.next;
textidx request/textidx


and:


p
a tal:condition=previous
   tal:attributes=href
string:${request/URL0}?start:int=${previous/first}textidx=${textidx}
   href=previous_urlprevious span
tal:replace=previous/lengthsize/span results/a
a tal:condition=next
   tal:attributes=href
string:${request/URL0}?start:int=${next/first}textidx=${textidx}
   href=next_urlnext span tal:replace=next/length20/span
results/a
   /p


Now it works.

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


[Zope] Reading and parsing a text file object

2006-07-19 Thread egf05
Hi,

I am new to Zope (but familiar with Python) and have a question.
I have a text file in  a folder and I would like to parse its content, and I
wanted to put the text in a string variable. I understand I can access the
content through file.data or better str(file.data).
However, the string I obtain has no carriage returns anymore, they are replaced
by a space. This is annoying because I cannot split the file line by line.

Is there a trick I do not know? Or is there a better way to parse the content
of a text file object? Any advice would be very appreciated.

Thanks,
Eric
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )