1

In my admin I have a form allowing to upload a file to fill the DB.

Parsing and filling the DB take a long time, so I'd like to do it asynchronously.

As recommended by several SO users I tried to install python-celery, but I can't manage to do it (I'm on Webfaction).

Is there any simple, easy-to-install alternative?

jul
  • 36,404
  • 64
  • 191
  • 318

2 Answers2

1

If webfaction supports cron jobs you can create your own pseudo broker. You could save your long running tasks to the db and in a 'tasks' table, this would allow you to return a response to the user instantaneously. Then there could be a cron that goes through very frequently and looks for uncompleteled tasks and processes them.

I believe this is what django mailer does https://github.com/jtauber/django-mailer/

https://stackoverflow.com/a/1419640/594589

Community
  • 1
  • 1
dm03514
  • 54,664
  • 18
  • 108
  • 145
0

Try Gearman along with it's python client library

It's very easy to setup and run gearman. Try few examples.

Ankur Gupta
  • 2,284
  • 4
  • 27
  • 40