Re: Django/Web Programming Pattern
Óhoz Em 14 de Nov de 2013 12:37, "Timothy W. Cook"escreveu: > Well, this isn't likely a Django specific question but since this > project is built in Django, I'd like to know how best to handle this > issue. > > I have a view that calls a function and performs a long running > process. It reads and processes a file, creating potentially > thousands of objects and can take up to several minutes to complete. > > Right now it just displays a pretty much blank template. This isn't > very user friendly. I imagine some kind of counter or progress bar > but I am not certain how best to display this via Django. > > What do others do in this case? > > Thanks, > Tim > > > > -- > MLHIM VIP Signup: http://goo.gl/22B0U > > Timothy Cook, MSc +55 21 94711995 > MLHIM http://www.mlhim.org > Like Us on FB: https://www.facebook.com/mlhim2 > Circle us on G+: http://goo.gl/44EV5 > Google Scholar: http://goo.gl/MMZ1o > LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CA%2B%3DOU3WXxamXh3avPc%2BmW0yWHJERPACsvvLErx9T8OJc%3D5tsUA%40mail.gmail.com > . > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAAGUOoSEMQsv%3D96UrWx9CG05yayXVb9K5ECf5n02LXKgaunJCg%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Django/Web Programming Pattern
Celery might overkill they are other more simple solutions that only involve your current database and cron jobs. Regards, Amirouche 2013/11/14 Jonathan Baker> You're welcome. I just set celery+rabbitmq up on a new project, and while > it can seem like a lot of steps (and potential information overload), it > isn't so bad once you get a grasp on the concepts. > > One thing that recently bit me: once in production with running workers, > if the models your task code are interacting with change (in my case, a > south migration from concrete inheritance to abstract), you need to restart > the workers just like you would Apache (doc: > http://docs.celeryproject.org/en/latest/userguide/workers.html#restarting-the-worker). > This seems obvious to me know, but hindsight... > > > On Thu, Nov 14, 2013 at 8:04 AM, Timothy W. Cook wrote: > >> Thanks Jonathan. Looks interesting from the FAQ. >> I'll give it a shot and see what happens. >> >> On Thu, Nov 14, 2013 at 12:39 PM, Jonathan Baker >> wrote: >> > This sounds like a good candidate for an async Celery task: >> > http://docs.celeryproject.org/en/latest/index.html >> > >> > >> > On Thu, Nov 14, 2013 at 7:37 AM, Timothy W. Cook wrote: >> >> >> >> Well, this isn't likely a Django specific question but since this >> >> project is built in Django, I'd like to know how best to handle this >> >> issue. >> >> >> >> I have a view that calls a function and performs a long running >> >> process. It reads and processes a file, creating potentially >> >> thousands of objects and can take up to several minutes to complete. >> >> >> >> Right now it just displays a pretty much blank template. This isn't >> >> very user friendly. I imagine some kind of counter or progress bar >> >> but I am not certain how best to display this via Django. >> >> >> >> What do others do in this case? >> >> >> >> Thanks, >> >> Tim >> >> >> >> >> >> >> >> -- >> >> MLHIM VIP Signup: http://goo.gl/22B0U >> >> >> >> Timothy Cook, MSc +55 21 94711995 >> >> MLHIM http://www.mlhim.org >> >> Like Us on FB: https://www.facebook.com/mlhim2 >> >> Circle us on G+: http://goo.gl/44EV5 >> >> Google Scholar: http://goo.gl/MMZ1o >> >> LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook >> >> >> >> -- >> >> You received this message because you are subscribed to the Google >> Groups >> >> "Django users" group. >> >> To unsubscribe from this group and stop receiving emails from it, send >> an >> >> email to django-users+unsubscr...@googlegroups.com. >> >> To post to this group, send email to django-users@googlegroups.com. >> >> Visit this group at http://groups.google.com/group/django-users. >> >> To view this discussion on the web visit >> >> >> https://groups.google.com/d/msgid/django-users/CA%2B%3DOU3WXxamXh3avPc%2BmW0yWHJERPACsvvLErx9T8OJc%3D5tsUA%40mail.gmail.com >> . >> >> For more options, visit https://groups.google.com/groups/opt_out. >> > >> > >> > >> > >> > -- >> > Jonathan D. Baker >> > Developer >> > http://jonathandbaker.com >> > >> > -- >> > You received this message because you are subscribed to the Google >> Groups >> > "Django users" group. >> > To unsubscribe from this group and stop receiving emails from it, send >> an >> > email to django-users+unsubscr...@googlegroups.com. >> > To post to this group, send email to django-users@googlegroups.com. >> > Visit this group at http://groups.google.com/group/django-users. >> > To view this discussion on the web visit >> > >> https://groups.google.com/d/msgid/django-users/CAPMFOb4M7BSndCdN3N0STgwiN%2BA%2BbAZ5f80OkqBtLB1xosfr7A%40mail.gmail.com >> . >> > For more options, visit https://groups.google.com/groups/opt_out. >> >> >> >> -- >> MLHIM VIP Signup: http://goo.gl/22B0U >> >> Timothy Cook, MSc +55 21 94711995 >> MLHIM http://www.mlhim.org >> Like Us on FB: https://www.facebook.com/mlhim2 >> Circle us on G+: http://goo.gl/44EV5 >> Google Scholar: http://goo.gl/MMZ1o >> LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to django-users+unsubscr...@googlegroups.com. >> To post to this group, send email to django-users@googlegroups.com. >> Visit this group at http://groups.google.com/group/django-users. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/CA%2B%3DOU3VisT0PhoHML-hDTX3t9SdRQOQ7UkvYdQz%3DBpai9AKEYA%40mail.gmail.com >> . >> For more options, visit https://groups.google.com/groups/opt_out. >> > > > > -- > Jonathan D. Baker > Developer > http://jonathandbaker.com > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To
Re: Django/Web Programming Pattern
You're welcome. I just set celery+rabbitmq up on a new project, and while it can seem like a lot of steps (and potential information overload), it isn't so bad once you get a grasp on the concepts. One thing that recently bit me: once in production with running workers, if the models your task code are interacting with change (in my case, a south migration from concrete inheritance to abstract), you need to restart the workers just like you would Apache (doc: http://docs.celeryproject.org/en/latest/userguide/workers.html#restarting-the-worker). This seems obvious to me know, but hindsight... On Thu, Nov 14, 2013 at 8:04 AM, Timothy W. Cookwrote: > Thanks Jonathan. Looks interesting from the FAQ. > I'll give it a shot and see what happens. > > On Thu, Nov 14, 2013 at 12:39 PM, Jonathan Baker > wrote: > > This sounds like a good candidate for an async Celery task: > > http://docs.celeryproject.org/en/latest/index.html > > > > > > On Thu, Nov 14, 2013 at 7:37 AM, Timothy W. Cook wrote: > >> > >> Well, this isn't likely a Django specific question but since this > >> project is built in Django, I'd like to know how best to handle this > >> issue. > >> > >> I have a view that calls a function and performs a long running > >> process. It reads and processes a file, creating potentially > >> thousands of objects and can take up to several minutes to complete. > >> > >> Right now it just displays a pretty much blank template. This isn't > >> very user friendly. I imagine some kind of counter or progress bar > >> but I am not certain how best to display this via Django. > >> > >> What do others do in this case? > >> > >> Thanks, > >> Tim > >> > >> > >> > >> -- > >> MLHIM VIP Signup: http://goo.gl/22B0U > >> > >> Timothy Cook, MSc +55 21 94711995 > >> MLHIM http://www.mlhim.org > >> Like Us on FB: https://www.facebook.com/mlhim2 > >> Circle us on G+: http://goo.gl/44EV5 > >> Google Scholar: http://goo.gl/MMZ1o > >> LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook > >> > >> -- > >> You received this message because you are subscribed to the Google > Groups > >> "Django users" group. > >> To unsubscribe from this group and stop receiving emails from it, send > an > >> email to django-users+unsubscr...@googlegroups.com. > >> To post to this group, send email to django-users@googlegroups.com. > >> Visit this group at http://groups.google.com/group/django-users. > >> To view this discussion on the web visit > >> > https://groups.google.com/d/msgid/django-users/CA%2B%3DOU3WXxamXh3avPc%2BmW0yWHJERPACsvvLErx9T8OJc%3D5tsUA%40mail.gmail.com > . > >> For more options, visit https://groups.google.com/groups/opt_out. > > > > > > > > > > -- > > Jonathan D. Baker > > Developer > > http://jonathandbaker.com > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Django users" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to django-users+unsubscr...@googlegroups.com. > > To post to this group, send email to django-users@googlegroups.com. > > Visit this group at http://groups.google.com/group/django-users. > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/django-users/CAPMFOb4M7BSndCdN3N0STgwiN%2BA%2BbAZ5f80OkqBtLB1xosfr7A%40mail.gmail.com > . > > For more options, visit https://groups.google.com/groups/opt_out. > > > > -- > MLHIM VIP Signup: http://goo.gl/22B0U > > Timothy Cook, MSc +55 21 94711995 > MLHIM http://www.mlhim.org > Like Us on FB: https://www.facebook.com/mlhim2 > Circle us on G+: http://goo.gl/44EV5 > Google Scholar: http://goo.gl/MMZ1o > LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CA%2B%3DOU3VisT0PhoHML-hDTX3t9SdRQOQ7UkvYdQz%3DBpai9AKEYA%40mail.gmail.com > . > For more options, visit https://groups.google.com/groups/opt_out. > -- Jonathan D. Baker Developer http://jonathandbaker.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit
Re: Django/Web Programming Pattern
On Thu, Nov 14, 2013 at 9:37 AM, Timothy W. Cookwrote: > Well, this isn't likely a Django specific question but since this > project is built in Django, I'd like to know how best to handle this > issue. > > I have a view that calls a function and performs a long running > process. It reads and processes a file, creating potentially > thousands of objects and can take up to several minutes to complete. > > Right now it just displays a pretty much blank template. This isn't > very user friendly. I imagine some kind of counter or progress bar > but I am not certain how best to display this via Django. > > What do others do in this case? > I have a situation where I'm loading a lot of images that takes a long time. What I do is I have this code in my template: ... loading images $('.loadMsg').show(); window.onload = function() { $(function() { $('.loadMsg').hide(); }); }; Not the most elegant thing in the world, but it works and meets my needs. YMMV -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CACwCsY5U1ngNF_WiNJv40nrW-U%3DsuB5DxEhaQ2_2rDk7X1W7JQ%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Django/Web Programming Pattern
Thanks Jonathan. Looks interesting from the FAQ. I'll give it a shot and see what happens. On Thu, Nov 14, 2013 at 12:39 PM, Jonathan Bakerwrote: > This sounds like a good candidate for an async Celery task: > http://docs.celeryproject.org/en/latest/index.html > > > On Thu, Nov 14, 2013 at 7:37 AM, Timothy W. Cook wrote: >> >> Well, this isn't likely a Django specific question but since this >> project is built in Django, I'd like to know how best to handle this >> issue. >> >> I have a view that calls a function and performs a long running >> process. It reads and processes a file, creating potentially >> thousands of objects and can take up to several minutes to complete. >> >> Right now it just displays a pretty much blank template. This isn't >> very user friendly. I imagine some kind of counter or progress bar >> but I am not certain how best to display this via Django. >> >> What do others do in this case? >> >> Thanks, >> Tim >> >> >> >> -- >> MLHIM VIP Signup: http://goo.gl/22B0U >> >> Timothy Cook, MSc +55 21 94711995 >> MLHIM http://www.mlhim.org >> Like Us on FB: https://www.facebook.com/mlhim2 >> Circle us on G+: http://goo.gl/44EV5 >> Google Scholar: http://goo.gl/MMZ1o >> LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to django-users+unsubscr...@googlegroups.com. >> To post to this group, send email to django-users@googlegroups.com. >> Visit this group at http://groups.google.com/group/django-users. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/CA%2B%3DOU3WXxamXh3avPc%2BmW0yWHJERPACsvvLErx9T8OJc%3D5tsUA%40mail.gmail.com. >> For more options, visit https://groups.google.com/groups/opt_out. > > > > > -- > Jonathan D. Baker > Developer > http://jonathandbaker.com > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CAPMFOb4M7BSndCdN3N0STgwiN%2BA%2BbAZ5f80OkqBtLB1xosfr7A%40mail.gmail.com. > For more options, visit https://groups.google.com/groups/opt_out. -- MLHIM VIP Signup: http://goo.gl/22B0U Timothy Cook, MSc +55 21 94711995 MLHIM http://www.mlhim.org Like Us on FB: https://www.facebook.com/mlhim2 Circle us on G+: http://goo.gl/44EV5 Google Scholar: http://goo.gl/MMZ1o LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2B%3DOU3VisT0PhoHML-hDTX3t9SdRQOQ7UkvYdQz%3DBpai9AKEYA%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Django/Web Programming Pattern
This sounds like a good candidate for an async Celery task: http://docs.celeryproject.org/en/latest/index.html On Thu, Nov 14, 2013 at 7:37 AM, Timothy W. Cookwrote: > Well, this isn't likely a Django specific question but since this > project is built in Django, I'd like to know how best to handle this > issue. > > I have a view that calls a function and performs a long running > process. It reads and processes a file, creating potentially > thousands of objects and can take up to several minutes to complete. > > Right now it just displays a pretty much blank template. This isn't > very user friendly. I imagine some kind of counter or progress bar > but I am not certain how best to display this via Django. > > What do others do in this case? > > Thanks, > Tim > > > > -- > MLHIM VIP Signup: http://goo.gl/22B0U > > Timothy Cook, MSc +55 21 94711995 > MLHIM http://www.mlhim.org > Like Us on FB: https://www.facebook.com/mlhim2 > Circle us on G+: http://goo.gl/44EV5 > Google Scholar: http://goo.gl/MMZ1o > LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CA%2B%3DOU3WXxamXh3avPc%2BmW0yWHJERPACsvvLErx9T8OJc%3D5tsUA%40mail.gmail.com > . > For more options, visit https://groups.google.com/groups/opt_out. > -- Jonathan D. Baker Developer http://jonathandbaker.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAPMFOb4M7BSndCdN3N0STgwiN%2BA%2BbAZ5f80OkqBtLB1xosfr7A%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Django/Web Programming Pattern
Well, this isn't likely a Django specific question but since this project is built in Django, I'd like to know how best to handle this issue. I have a view that calls a function and performs a long running process. It reads and processes a file, creating potentially thousands of objects and can take up to several minutes to complete. Right now it just displays a pretty much blank template. This isn't very user friendly. I imagine some kind of counter or progress bar but I am not certain how best to display this via Django. What do others do in this case? Thanks, Tim -- MLHIM VIP Signup: http://goo.gl/22B0U Timothy Cook, MSc +55 21 94711995 MLHIM http://www.mlhim.org Like Us on FB: https://www.facebook.com/mlhim2 Circle us on G+: http://goo.gl/44EV5 Google Scholar: http://goo.gl/MMZ1o LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2B%3DOU3WXxamXh3avPc%2BmW0yWHJERPACsvvLErx9T8OJc%3D5tsUA%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.