<div dir="ltr">Well, after some hours and many buildouts done, I couldn&#39;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&#39;s important to add the egg here, when I added just to the extra-requirements in the setup.py of my egg, it doesn&#39;t work. Something about IOBTree.family32 it&#39;s raised... sorry, I didn&#39;t copy the traceback<br>
3) Here, the instance starts, but tests won&#39;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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (&#39;<a href="http://127.0.0.1">127.0.0.1</a>&#39;, 8881),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name=&#39;zeostorage&#39;,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br>db = ZODB.DB(storage, database_name=&#39;main&#39;)<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>&nbsp;&nbsp;&nbsp; ....<br>&nbsp;&nbsp;&nbsp; do something<br><br>def some_job(context):<br>&nbsp;&nbsp;&nbsp; urltool = getToolByName(context, &quot;portal_url&quot;)<br>&nbsp;&nbsp;&nbsp; portal = urltool.getPortalObject()<br>
<br>&nbsp;&nbsp;&nbsp; #portal._p_jar give us the connection to the ZODB<br>&nbsp;&nbsp;&nbsp; queue = zc.async.interfaces.IQueue(portal._p_jar)<br>&nbsp;&nbsp;&nbsp; job = queue.put(zc.async.job.Job(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; async_job,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; portal.aq_base)<br>
&nbsp;&nbsp;&nbsp; )<br>======================<br><br>This code it&#39;s running and it works, but I&#39;m not sure if it&#39;s the correct usage... Gary?<br><br>Last question, when I run my test, I&#39;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&nbsp; (oid 44148): another process?&nbsp; (To stop poll attempts in this process, set ``zc.async.dispatcher.get().activated = False``.&nbsp; To stop polls permanently, don&#39;t start a zc.async.dispatcher!)<br>
<br>I was reading ftesting.txt from zc.async but I yet don&#39;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">&lt;<a href="mailto:michael.dunstan@gmail.com">michael.dunstan@gmail.com</a>&gt;</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">&lt;<a href="mailto:santiago.videla@gmail.com">santiago.videla@gmail.com</a>&gt; wrote:<br>
</div><div class="Ih2E3d">&gt; Hi guys,<br>
&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; z3c.recipe.fakezope2eggs lets you tame these kind of dependencies. See<br>
&gt;&gt;&gt; <a href="http://pypi.python.org/pypi/z3c.recipe.fakezope2eggs" target="_blank">http://pypi.python.org/pypi/z3c.recipe.fakezope2eggs</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; plone.recipe.zope2install includes a couple of options for making use<br>
&gt;&gt;&gt; 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>
&gt;<br>
&gt;<br>
&gt; Nice, I will try those.<br>
&gt;<br>
&gt; But I have another issue... :(<br>
&gt; I need to use repoze.plone and I don&#39;t have any zope2 section in my<br>
&gt; buildout.cfg (needed to use fakezope2eggs). I need to find a way to tell to<br>
&gt; 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>