On 03:23 pm, j...@rainville.net wrote:
Hi -
I have a very simple twisted service that reads a temperature sensor. A
client can ask for the current temperature via JSON and as a result the
service will read the temperature sensor and respond with the current
temp. This works great if I run it as a python module from the command
line but if I run it as a service with twistd it seems to read the temp
on startup then the temp seems to be cached as it never changes. I have
print calls in the getTemp method right before it calls into the
hardware library, they are getting called in both cases - but the
return from the call never changes in the twistd case. Any ideas?
Also, I have another service (not twisted) that runs in the background
that periodically reads the temp and responds to temperature changes.
This is working fine so I’m pretty sure the problem is isolated to
twistd.
There's no intentional caching of this sort added automatically by
`twistd` or by any other part of Twisted. Can you share your code?
Someone might spot what's going on.
As an aside, sounds like a good project - it sounds similar to something
I've been working on. Can you share your code? ;)
Jean-Paul
_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python