zope

What is the correct way to backup ZODB blobs?

扶醉桌前 提交于 2019-12-10 03:58:04
问题 I am using plone.app.blob to store large ZODB objects in a blobstorage directory. This reduces size pressure on Data.fs but I have not been able to find any advice on backing up this data. I am already backing up Data.fs by pointing a network backup tool at a directory of repozo backups. Should I simply point that tool at the blobstorage directory to backup my blobs? What if the database is being repacked or blobs are being added and deleted while the copy is taking place? Are there files in

Plone - Best practice on where to store image and file attachments in pages?

☆樱花仙子☆ 提交于 2019-12-08 19:17:48
问题 We are building an Intranet website using Plone 4.1.3 and would like to know if there is a Plone best practice on storing the files and images that are attached to pages. Our Intranet is more of a collaborative site where users can post News item and other articles. So users will be inserting images (using TinyMCE's insert/edit Image) and attaching files to pages. Question: where should we ask the users to upload the images and files to? Should we let users upload images and files to the same

Zope Conflict Errors

落爺英雄遲暮 提交于 2019-12-08 02:53:34
问题 My site's zope log reports a number of conflict errors. Average of 120 per day of which 2-3 are unresolved. I've come across many articles on why conflict errors occur but nothing has been clear. Most of these conflict errors occur on pages which run select queries on MySQL database. It is said that the number of conflict errors rise with an increase in concurrency of http requests because one ZODB object is created and the other tries to write to it. (I could not understand why and how ZODB

Can you define an entry point in your Plone product to run a script as if it was called by bin/instance run

不羁的心 提交于 2019-12-07 08:39:16
问题 I have a batch job that I need to run occasionally against my Plone instance. It needs access to the code in my Plone product and other Plone code and to query the catalog. I've included the script in my Plone product and currently run it via bin/instance run <path to script in eggs directory> Obviously if a new version of my product comes along I need to change the path to point to the new version of the egg. What I'd like to do is define any entry point for the script in my product's setup

What is the best way to convert a zope DateTime object into Python datetime object?

强颜欢笑 提交于 2019-12-06 22:22:29
问题 I need to convert a zope 2 DateTime object into a Python datetime object. What is the best way to do that? Thanks, Erika 回答1: modernthingy = datetime.datetime.fromtimestamp(zopethingy.timeTime()) The datetime instance is timezone-naive; if you need to support timezones (as Zope2's DateTime does), I recommend third-party extension package pytz. 回答2: Newer DateTime implementations (2.11 and up) have a asdatetime method that returns a python datetime.datetime instance: modernthingy = zopethingy

What is the suggested way to cron-automate ZODB packs for a production Plone instance?

微笑、不失礼 提交于 2019-12-06 17:14:25
问题 Looking at plone.org to find a way to periodically pack my instance's ZODB I could only find http://plone.org/documentation/faq/how-do-i-pack-the-zodb that doesn't talk about automated packs, but just manually initiated ones. I know I can simulate the manual pack with wget or curl, but I'd like to know if that is the best practice in use for production sites. 回答1: If you are using ZEO you can add the following to your Crontab to do this: 0 1 * * 6 <path-to-buildout>/bin/zeopack If you don't

Zope Conflict Errors

ぃ、小莉子 提交于 2019-12-06 11:55:14
My site's zope log reports a number of conflict errors. Average of 120 per day of which 2-3 are unresolved. I've come across many articles on why conflict errors occur but nothing has been clear. Most of these conflict errors occur on pages which run select queries on MySQL database. It is said that the number of conflict errors rise with an increase in concurrency of http requests because one ZODB object is created and the other tries to write to it. (I could not understand why and how ZODB objects are modified. Can anyone explain this ?) But even when there is only one user using it, there

Zope.Schema/Plone - How can I set the value of a Datetime field in an updateWidget function?

这一生的挚爱 提交于 2019-12-06 07:38:00
On a plone site I am working on, I have a form that is used to edit records of objects stored mapped to a table in the backend database. In the interface class, one of the fields is a schema.Datetime field. class ICalibration(Interface): """Interface class for calibration records """ ... Last_Calibration = schema.Datetime(title=u"Last Calibration" description=u"date of last calibration", ) ... In my updateWidgets function, in the edit form, I try to set the value of the widget, class EditCalibration(form.Form): grok.name('edit-calibration') grok.require('zope2.View') grok.context(ISiteRoot)

“Unhandled exception in thread started by Error in sys.excepthook” during relstorage zodb pack

白昼怎懂夜的黑 提交于 2019-12-06 05:16:42
We have a reasonably large Plone instance running on its own mount point. The ZMI interface lists the size of the database as 7101.4M. We run a weekly pack of the database using the Relstorage zodbpack.py script, removing objects older than 7 days. The last two weeks the cron job that runs the pack has output the following: Sun Jun 26 07:00:38 BST 2011 packing cms mount /home/zope/home/parts/zope2/lib/python/zope/configuration/xmlconfig.py:323: DeprecationWarning: zope.app.annotation has moved to zope.annotation. Import of zope.app.annotation will become unsupported in Zope 3.5 __import__

Can you define an entry point in your Plone product to run a script as if it was called by bin/instance run

左心房为你撑大大i 提交于 2019-12-05 16:23:08
I have a batch job that I need to run occasionally against my Plone instance. It needs access to the code in my Plone product and other Plone code and to query the catalog. I've included the script in my Plone product and currently run it via bin/instance run <path to script in eggs directory> Obviously if a new version of my product comes along I need to change the path to point to the new version of the egg. What I'd like to do is define any entry point for the script in my product's setup.py and then use the buildout recipe like zc.recipe.egg so that I can just run bin/myscript How do I do