Did you check out django-celery yet?

On Mon, Mar 19, 2012 at 2:18 PM, Arruda <felipe.arruda.pon...@gmail.com>wrote:
> *(I've created a topic like this a few minutes ago, but was using the old
> google groups, and now it's broken. So I created a new one using the new
> google groups).*
> Hi, I'll try to explain the best I can my problem, and I don't know if
> what I'm trying to archive is the best way to get where I want, but
> here is it:
> I want that a specific view to run in a new thread, ex:
> * def foo(request):
>    do_something_slow()
>   return httpResponse*
>
> But I DON'T want that a new thread is run inside the view, the view it
> self should be runned in another thread, ex:
> *
>  def foo(request):
>    t = thread(target=do_something_slow()....)
>    t.daemon = True
>    t.start()
>
>   return httpResponse
> *
> This way when a user A access any page the site will load, even if a
> user B is accessing the 'foo' view.
> But the B user when access the view 'foo' will load it just a if if
> was a normal view( will be slow and will render the response just
> after do_something_slow() finished running).
>
> I don't know if this is what I want, but I believe that there is
> another way around:
> when user B calls foo view, it will render to him a page with a JS(I
> don't know JS either, so correct me if I'm talking nonsense) that say
> its "Loading..."
> And after the do_someting_slow() finished running if will change the
> content of the page to whatever the result of "do_something_slow" was.
>
> Thanks for the attention.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/jc20eqhcl8oJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to