Cool, thanks Javier.
I will look into the different solutions you suggest.
Cheers,
Pau
On Thursday, November 28, 2013 9:32:15 AM UTC+1, Javier Guerra wrote:
>
> On Thu, Nov 28, 2013 at 2:42 AM, Pau Creixell
>
> wrote:
> > I guess if there isn't another simpler way, I'll
On Thu, Nov 28, 2013 at 2:42 AM, Pau Creixell wrote:
> I guess if there isn't another simpler way, I'll have to dig into Celery.
there _are_ simpler alternatives to Celery:
- worker threads: similar to your proposal, but with very well-thought
process control. pros: no
Hi again,
Thanks for all your answers.
Yes, I also found out many recommend Celery, but I was hoping for a
"simpler" solution, if there is one...
Doug, I already tried without the self in arguments, but got the same
error, unfortunately.
I guess if there isn't another simpler way, I'll have to
On Wed, Nov 27, 2013 at 2:58 PM, Pau Creixell wrote:
> Hi there!
>
> I am trying to run jobs in the background using the following (minimal)
> code:
>
> Under views.py:
>
> def submit(request):
>model = MyModel()
>model.RunInAThread(ReferenceSeparator,
maybe your webserver won't permit multiprocessing, it depends on how you
are running django.
In any case I would also recommend celery, in this case you have control on
how many workers are running, having a webrequest open yet another process
means you won't have control on how many processes
When I asked about this it seems that the best solution is to use
Celery in combination with Django. There seems to be quite a bit of
good experience here using them together.
HTH,
Tim
On Wed, Nov 27, 2013 at 5:58 PM, Pau Creixell wrote:
> Hi there!
>
> I am trying to
Hi there!
I am trying to run jobs in the background using the following (minimal)
code:
Under views.py:
def submit(request):
model = MyModel()
model.RunInAThread(ReferenceSeparator, MutationSeparator)
Under models.py:
class MyModel(models.Model):
def RunInAThread(self,
7 matches
Mail list logo