uwsgi デコレータ (特に cron デコレータ) を使用して、特定の時間に処理を実行しています。次のコードがあります。
import cherrypy
import uwsgidecorators
class TestObject(object):
@cherrypy.expose
def index(self):
launchapp = self.launchapp(-1,-1,-1,-1,-1,"foobar")
return "This is a test"
@uwsgidecorators.cron(minute,hour,day,month,dayweek)
def launchapp(self,target):
print "the target is %s" %target
return
ただし、次のエラーが表示されます。
@uwsgidecorators.cron(minute,hour,day,month,dayweek)
NameError: name 'minute' is not defined
基本的に、index 関数で cron デコレータのタイミング パラメータを指定しようとしています。私が間違っていることを知っている人はいますか?