Re: [Wikitech-l] Storing data across requests

2010-08-18 Thread Bryan Tong Minh
On Wed, Aug 18, 2010 at 1:13 AM, Michael Dale wrote: > On 07/29/2010 10:15 AM, Bryan Tong Minh wrote: >> Hi, >> >> >> I have been working on getting asynchronous upload from url to work >> properly[1]. A problem that I encountered was that I need to store >> data across requests. Normally I would

Re: [Wikitech-l] Storing data across requests

2010-08-17 Thread Michael Dale
On 07/29/2010 10:15 AM, Bryan Tong Minh wrote: > Hi, > > > I have been working on getting asynchronous upload from url to work > properly[1]. A problem that I encountered was that I need to store > data across requests. Normally I would use $_SESSION, but this data > should also be available to job

Re: [Wikitech-l] Storing data across requests

2010-08-17 Thread Bryan Tong Minh
On Sat, Jul 31, 2010 at 1:07 AM, Chad wrote: > On Fri, Jul 30, 2010 at 3:57 PM, Platonides wrote: >> Bryan Tong Minh wrote: >>> Also, on places where no memcached or equivalent is available (i.e. >>> CACHE_NONE), this will not work. >> >> Then you could be using the objectcache table in the datab

Re: [Wikitech-l] Storing data across requests

2010-07-30 Thread Platonides
Chad wrote: > On Fri, Jul 30, 2010 at 3:57 PM, Platonides wrote: >> Bryan Tong Minh wrote: >>> Also, on places where no memcached or equivalent is available (i.e. >>> CACHE_NONE), this will not work. >> >> Then you could be using the objectcache table in the database. > > No, that's CACHE_DB. CAC

Re: [Wikitech-l] Storing data across requests

2010-07-30 Thread Chad
On Fri, Jul 30, 2010 at 3:57 PM, Platonides wrote: > Bryan Tong Minh wrote: >> Also, on places where no memcached or equivalent is available (i.e. >> CACHE_NONE), this will not work. > > Then you could be using the objectcache table in the database. > > No, that's CACHE_DB. CACHE_NONE really mean

Re: [Wikitech-l] Storing data across requests

2010-07-30 Thread Platonides
Bryan Tong Minh wrote: > Also, on places where no memcached or equivalent is available (i.e. > CACHE_NONE), this will not work. Then you could be using the objectcache table in the database. ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org ht

Re: [Wikitech-l] Storing data across requests

2010-07-30 Thread Bryan Tong Minh
On Fri, Jul 30, 2010 at 5:32 PM, Aryeh Gregor wrote: > On Thu, Jul 29, 2010 at 6:07 PM, Platonides wrote: >> Memcached* >> >> Our $_SESSION simply lives in memcached. >> So we could do >>  $fake_session = $wgMemc->get( wfMemcKey( 'session', $session_id ) ) ; >>  $fake_session["upload_ok"] = true;

Re: [Wikitech-l] Storing data across requests

2010-07-30 Thread Aryeh Gregor
On Thu, Jul 29, 2010 at 6:07 PM, Platonides wrote: > Memcached* > > Our $_SESSION simply lives in memcached. > So we could do >  $fake_session = $wgMemc->get( wfMemcKey( 'session', $session_id ) ) ; >  $fake_session["upload_ok"] = true; >  $wgMemc->set( wfMemcKey( 'session', $session_id ), $fake_s

Re: [Wikitech-l] Storing data across requests

2010-07-29 Thread Platonides
Bryan Tong Minh wrote: > Or is there any other mechanism to be able to share data between the > jobqueue and requests? > > > Regards, > Bryan Memcached* Our $_SESSION simply lives in memcached. So we could do $fake_session = $wgMemc->get( wfMemcKey( 'session', $session_id ) ) ; $fake_session[

Re: [Wikitech-l] Storing data across requests

2010-07-29 Thread Bryan Tong Minh
On Thu, Jul 29, 2010 at 9:52 PM, Aryeh Gregor wrote: > On Thu, Jul 29, 2010 at 3:31 PM, Bryan Tong Minh > wrote: >> I need the job to store its result somewhere. > > What does it need to store?  If it's just success or failure, then why > not assume success if the file exists, failure if the job

Re: [Wikitech-l] Storing data across requests

2010-07-29 Thread Aryeh Gregor
On Thu, Jul 29, 2010 at 3:31 PM, Bryan Tong Minh wrote: > I need the job to store its result somewhere. What does it need to store? If it's just success or failure, then why not assume success if the file exists, failure if the job ran (is not still in the job table) but the file doesn't exist?

Re: [Wikitech-l] Storing data across requests

2010-07-29 Thread Bryan Tong Minh
On Thu, Jul 29, 2010 at 8:36 PM, Aryeh Gregor wrote: > On Thu, Jul 29, 2010 at 1:15 PM, Bryan Tong Minh > wrote: >> I have been working on getting asynchronous upload from url to work >> properly[1]. A problem that I encountered was that I need to store >> data across requests. Normally I would u

Re: [Wikitech-l] Storing data across requests

2010-07-29 Thread Aryeh Gregor
On Thu, Jul 29, 2010 at 1:15 PM, Bryan Tong Minh wrote: > I have been working on getting asynchronous upload from url to work > properly[1]. A problem that I encountered was that I need to store > data across requests. Normally I would use $_SESSION, but this data > should also be available to job

[Wikitech-l] Storing data across requests

2010-07-29 Thread Bryan Tong Minh
Hi, I have been working on getting asynchronous upload from url to work properly[1]. A problem that I encountered was that I need to store data across requests. Normally I would use $_SESSION, but this data should also be available to job runners, and $_SESSION isn't. As I see there are basicall