Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #7460

Re: Output status during processing

From "M. Strobel" <sorry_no_mail_here@nowhere.dee>
Newsgroups comp.lang.php
Subject Re: Output status during processing
Date 2012-11-04 22:28 +0100
Message-ID <afo4vnFfjeU1@mid.uni-berlin.de> (permalink)
References <k76fcg$8at$1@dont-email.me>

Show all headers | View raw


Am 04.11.2012 20:23, schrieb Scott Johnson:
> Hello
> 
> I hate to come here with a question without any tried code but I really do not even
> know where to start, I have never attempted this before without a net.
> 
> What I would like to do is provide an output to the browser during a long processing
> term.
> 
> Exactly what I am doing is this.
> 
> I am loading a csv file to update inventory.
> 
> During this process I am flushing the current Table and then loading the new and then
> comparing the inventory table to a product table and would like to provide status of
> where we are in the process what items matched and changed and so forth in real time.
> 
> I have done some similar tasks in JS but with minimal steps in the processing then
> what I am trying to accomplish.
> 
> I did some binging and found that it may have to do with output buffering but nothing
> particular to my situation. (as far as I could find)
> 
> If this is possible could someone point me in the right direction and I will do the
> leg work.

Are you starting your long running job in the browser? Not good, the whole setup is
designed for request-response, and not long running jobs.

I would try to design the long running update-compare job as a separate process,
writing status or progress information to a file/a db table. Then you have a
corresponding script you call in your browser, showing you status and progress. This
could be done with whole page refreshs or with ajax.

/Str.

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Output status during processing Scott Johnson <noonehome@chalupasworld.com> - 2012-11-04 11:23 -0800
  Re: Output status during processing "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-11-04 22:28 +0100
    Re: Output status during processing Scott Johnson <noonehome@chalupasworld.com> - 2012-11-04 13:52 -0800
      Re: Output status during processing Jerry Stuckle <jstucklex@attglobal.net> - 2012-11-04 20:21 -0500
        Re: Output status during processing Scott Johnson <noonehome@chalupasworld.com> - 2012-11-04 19:10 -0800
          Re: Output status during processing crankypuss <noemail@noemail.invalid> - 2012-11-05 07:24 -0700
      Re: Output status during processing Denis McMahon <denismfmcmahon@gmail.com> - 2012-11-05 12:40 +0000
        Re: Output status during processing Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-05 17:32 +0100
  Re: Output status during processing Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-05 14:22 +0100
    Re: Output status during processing Scott Johnson <noonehome@chalupasworld.com> - 2012-11-05 11:59 -0800
      Re: Output status during processing Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-06 00:21 +0100

csiph-web