私はこのレシピを使用しています:Ubuntuサーバーでhttp://code.activestate.com/recipes/278731/ 。
私はこのようなデーモンインスタンスを作成します:
class MyDaemon(Daemon):
def run(self):
while True:
try:
do_my_data_processing()
except MySQLdb.OperationalError:
# Sleep an extra 30 seconds if database is away.
time.sleep(30)
time.sleep(30)
問題は、スリープ中であっても、デーモンが利用可能なCPUパワーのほとんどすべてを消費することです。
私は何が間違っているのですか?