[Zope] disable versions for an object ?
J Cameron Cooper
jccooper at jcameroncooper.com
Thu Mar 18 18:09:25 EST 2004
Thomas Bennett wrote:
> Is there a way to disable versions for a single object or another
> solution?
>
> My case in point is that I have an AXIS Video WEB cam that the
> "Boss" wants a new shot sent to the server every 5 seconds. Well I
> got that part working fine because the camera is running an embedded
> linux and ftp to a PhotoFolder object on the server so it would be a
> Photo object. I activated that sometime last week and it worked fine
> until Sunday I got a call that users could not connect to the server.
> The Data.fs file had grown to 40 times is usual size and filled up the
> hard drive. No log entries could be written so I assumed that and
> other processes that needed to write to the drive stopped services. I
> had to run Christoph Becker-Freyseng's zodbpack.py on the live
> Data.fs file(after stopping the server of course), after deleting some
> large older log files and such, since there was nowhere to copy the
> Data.fs file. THANK YOU CHRISTOPH !! I assume that Zope was keeping
> a history version of each photo going to the server which would be 720
> photos/hour. So that is why I would want to disable history versions
> for a single object. In the mean time I am using LocalFS to serve the
> file from the file system where a second FTP server is running to
> receive the pictures but I can't show it as a Photo object without
> running it through the Image2photo script. I'd rather not resort to
> setting a ZCron or something to pack the live Data.fs every hour, day
> or whenever.
Undo is specified only by Storage at the moment. You can try to find a
non-Undo Storage (DirectoryStorage may have one, and I've seen one in
the ZODB source, I think) or use APE to persist just that object (or
just objects under the container of that object) to the filesystem.
> And while on the camera subject, is there a way I can send a login to
> the camera for live video. The page I have now connects to the camera
> but a username/password box pops up On IE and Netscape. I have a user
> defined for view only but I don't want the person viewing to have to
> login but rather it be automatic. I've tried
> http://username:password@www.mycamera.site but this doesn't work and I
> think recent security patches have disabled that format.
If you use CookieCrumbler, the cookie can be set to persist across
browser sessions, I think. You could also hack together a way to grant
access only upon receiving a certain hard-to-guess key in the URL
parameters.
--jcc
--
"He who fights with monsters should look to it that he himself does not become a monster. And when you gaze long into an abyss the abyss also gazes into you."
More information about the Zope
mailing list