<div dir="ltr">Well, after some hours and many buildouts done, I couldn't get this running.<br><br>The best approach I got is like this (using repoze.plone):<br>1) just run the standard buildout.cfg for repoze.plone<br>
2) add zc.async to the eggs section in the buildout and run again. <br>It's important to add the egg here, when I added just to the extra-requirements in the setup.py of my egg, it doesn't work. Something about IOBTree.family32 it's raised... sorry, I didn't copy the traceback<br>
3) Here, the instance starts, but tests won't work. I had to edit the test script, to move down the import of zope.testing. after that, tests are running. Obviously, running the buildout again, will overwrite this change<br>
<br>I will try to keep working on this, but I have to move on these days<br><br>Now, a question about the usage of zc.async, I followed the docs in the QUICKSTART txt<br>In my egg I have this<br><br>__init__.py<br>=================<br>
import ZEO.ClientStorage<br>import ZODB<br>import zc.async.configure<br><br>storage = ZEO.ClientStorage.ClientStorage(<br> ('<a href="http://127.0.0.1">127.0.0.1</a>', 8881),<br> name='zeostorage',<br>
)<br>db = ZODB.DB(storage, database_name='main')<br>zc.async.configure.base()<br>zc.async.configure.start(db, poll_interval=1)<br><br>=====================<br><br>some_handlers.py<br>
=====================<br>import zc.async.interfaces<br><br>def async_job():<br> ....<br> do something<br><br>def some_job(context):<br> urltool = getToolByName(context, "portal_url")<br> portal = urltool.getPortalObject()<br>
<br> #portal._p_jar give us the connection to the ZODB<br> queue = zc.async.interfaces.IQueue(portal._p_jar)<br> job = queue.put(zc.async.job.Job(<br> async_job,<br> portal.aq_base)<br>
)<br>======================<br><br>This code it's running and it works, but I'm not sure if it's the correct usage... Gary?<br><br>Last question, when I run my test, I'm getting this error<br><br>2008-09-12 02:20:01 ERROR zc.async.events UUID 10c69742-8084-11dd-9853-0016d3094e86 already activated in queue (oid 44148): another process? (To stop poll attempts in this process, set ``zc.async.dispatcher.get().activated = False``. To stop polls permanently, don't start a zc.async.dispatcher!)<br>
<br>I was reading ftesting.txt from zc.async but I yet don't understand what should I do, any hints?<br><br>best regards<br><br><div class="gmail_quote">On Thu, Sep 11, 2008 at 5:51 PM, Michael Dunstan <span dir="ltr"><<a href="mailto:michael.dunstan@gmail.com">michael.dunstan@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On Fri, Sep 12, 2008 at 5:02 AM, Santiago Videla<br>
<div class="Ih2E3d"><<a href="mailto:santiago.videla@gmail.com">santiago.videla@gmail.com</a>> wrote:<br>
</div><div class="Ih2E3d">> Hi guys,<br>
><br>
>>><br>
>>> z3c.recipe.fakezope2eggs lets you tame these kind of dependencies. See<br>
>>> <a href="http://pypi.python.org/pypi/z3c.recipe.fakezope2eggs" target="_blank">http://pypi.python.org/pypi/z3c.recipe.fakezope2eggs</a><br>
>>><br>
>>> plone.recipe.zope2install includes a couple of options for making use<br>
>>> of that too. See <a href="http://pypi.python.org/pypi/plone.recipe.zope2install" target="_blank">http://pypi.python.org/pypi/plone.recipe.zope2install</a><br>
><br>
><br>
> Nice, I will try those.<br>
><br>
> But I have another issue... :(<br>
> I need to use repoze.plone and I don't have any zope2 section in my<br>
> buildout.cfg (needed to use fakezope2eggs). I need to find a way to tell to<br>
> fakezope2eggs where is the python/lib/zope directory<br>
<br>
</div>I think you should be able to do that by declaring a zope2-location<br>
for the z3c.recipe.fakezope2eggs part.<br>
<br>
[fakezope2eggs]<br>
recipe = z3c.recipe.fakezope2eggs<br>
zope2-location = ...<br>
<br>
where ... points to your python directory of python/lib/zope<br>
<br>
--<br>
<font color="#888888">Michael Dunstan<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Santiago Videla<br><a href="http://www.revolucionesweb.com.ar">www.revolucionesweb.com.ar</a><br><a href="http://www.linkedin.com/in/svidela">http://www.linkedin.com/in/svidela</a><br>
<br>Sigue la mata dando de que hablar siempre abajo y a la izquierda donde el pensamiento que se hace corazón resplandece con la palabra sencilla y humilde que l@s tod@s somos.<br>
</div>