Re: [pylons-devel] Re: Scripting requests - Pyramid + Celery

2015-11-18 Thread Jonathan Vanasco
Ok, this use case is somewhat similar to ours... in that it doesn't require pyramid at all. We use sqlalchemy, but zodb shouldn't be much different. We have 2 packages: * `myapp_pyramid` * `myapp_celery` `myapp_pyramid` will import `myapp_celery` to call it's `@task` decorated functions. the

Re: [pylons-devel] Re: Scripting requests - Pyramid + Celery

2015-11-18 Thread Robin Harms Oredsson
Fair point :) I have an application with a ZODB. Some parts of the app will require complex calculations that will take a really long time to run. After they finish, they'll want to write something. So i essentially imagine something like this: - Pyramid frontend, read access - Celery long runnin

Re: [pylons-devel] Scripting requests - Pyramid + Celery

2015-11-18 Thread Gavin Carothers
Ours looks like this: class WinslowTask(Task): abstract = True _winslow = None @property def winslow(self): if self._winslow is None: from winslow.lexelasticsearch import LexElasticSearch es_conf = bias_app.conf['ELASTICSEARCH'] es = Lex

[pylons-devel] Re: Scripting requests - Pyramid + Celery

2015-11-18 Thread Jonathan Vanasco
What exactly are you trying to do with Celery - can you give an example? -- You received this message because you are subscribed to the Google Groups "pylons-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-devel+unsubscr...@googlegroups.co

[pylons-devel] Scripting requests - Pyramid + Celery

2015-11-18 Thread Robin Harms Oredsson
Hi all, I've tried to read up on proper usage of celery within Pyramid. So far most suggestions seem to be to load the whole stack via pyramid.paster.bootstrap for each task. Quite cumbersome. The right way to do this as far as I understand would be to create a request for each task and then close