Thank you Jonathan, thank you Andy,
I finally chose the "includeme" path to solve the problem :-)
As regards elasticsearch and "rivers", I haven't had the time to give
them an in-depth look yet, but it is high on my to-do list.
Laurent.
Le 26/06/13 21:55, Jonathan Vanasco a écrit :
> Can you d
since it seems you only need the config in ``IndexEngine``, i would try to
find a solution with ``def includeme(config)``. this makes you independent
from ``get_current_request`` which also says in the doc::
def get_current_request():
"""Return the currently active request or ``None`` if no
Can you do this without a request?
It sounds like you just need to get to registry.settings ; I'm on mobile ,
but I recall there were some (not recommended, but might still work) ways
to get at those without being tied to a request.
you could also run some routine to register your app settings
Thank you Michael,
in fact, my command-line script does use pyramid.paster.get_appsettings,
and I can read the setting just fine. My problem is with the SQLAlchemy
event listener in my model:
- The reindex_after_update function instantiates an IndexEngine object
- The IndexEngine attempts to read
You can create a request-like environment by using the bootstrap api which
will allow you to use get_current_request if you like, among other things
you would normally do in your app.
Another option is to simply parse the settings from your ini file using
p.paster.get_appsettings('foo.ini').
http
Hello everybody,
my last questions to the list have all remained unanswered /
unacknowledged :'-(, but I want to give it another try. This one should
be simpler than the rest.
Basically, I have a data model in which an SQLAlchemy "after_update"
listener automatically reindexes object attributes i