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


Groups > comp.lang.python > #11482

Re: Data issues with Django and Apache

X-FeedAbuse http://nntpfeed.proxad.net/abuse.pl feeded by 88.191.16.109
Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!nntpfeed.proxad.net!nospam.fr.eu.org!usenet-fr.net!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!news.glorb.com!solaris.cc.vt.edu!news.vt.edu!newsfeed-00.mathworks.com!panix!gordon
From John Gordon <gordon@panix.com>
Newsgroups comp.lang.python
Subject Re: Data issues with Django and Apache
Date Tue, 16 Aug 2011 00:10:21 +0000 (UTC)
Organization PANIX Public Access Internet and UNIX, NYC
Lines 27
Message-ID <j2cchc$167$1@reader1.panix.com> (permalink)
References <j27bde$dlr$1@reader1.panix.com>
NNTP-Posting-Host panix2.panix.com
X-Trace reader1.panix.com 1313453421 1223 166.84.1.2 (16 Aug 2011 00:10:21 GMT)
X-Complaints-To abuse@panix.com
NNTP-Posting-Date Tue, 16 Aug 2011 00:10:21 +0000 (UTC)
User-Agent nn/6.7.3
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:11482

Show key headers only | View raw


In <j27bde$dlr$1@reader1.panix.com> John Gordon <gordon@panix.com> writes:

> The problem is that I get conflicting results as to whether these temporary
> records have reached their expiration date, depending if I search for them
> via an Apache web call or if I do the search locally from a python shell.

> And to make it weirder, the conflicts go away if I stop and restart the
> Apache server, although any new records created after this point will still
> exhibit the issue.

The problem turned out to be a class variable that contained a time filter
with the "current" time.

But since it was a class variable, it was only evaluated once upon import
and its idea of "now" was forever frozen at that moment, so it always
compared as being less than any of the lock records that were passed in.

I changed it to be a class method that constructs and returns a new time
filter whenever it is called.

Thanks for everyone's help!

-- 
John Gordon                   A is for Amy, who fell down the stairs
gordon@panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Data issues with Django and Apache John Gordon <gordon@panix.com> - 2011-08-14 02:20 +0000
  Re: Data issues with Django and Apache Daniel Roseman <daniel@roseman.org.uk> - 2011-08-14 11:12 -0700
    Re: Data issues with Django and Apache John Gordon <gordon@panix.com> - 2011-08-14 23:43 +0000
  Re: Data issues with Django and Apache John Gordon <gordon@panix.com> - 2011-08-16 00:10 +0000

csiph-web