dt = Today()
return dt - datetime.timedelta(days=1)
+def Prehistoric():
+ dt = datetime.date(2000,01,01)
+ return dt
+
def GetData(sid,pid,fromDate=Yesterday(),toDate=Today()):
if database:
c = database.cursor()
def ProcessTable(sid,pid):
- if not current:
+ if process_all:
+ data=GetData(sid,pid,Prehistoric(),Today())
+ elif not current:
data=GetData(sid,pid)
else:
data=GetData(sid,pid,Today(),Tomorrow())
else:
current=False
+if len(sys.argv)==2 and sys.argv[1]=='all':
+ process_all=True
+else:
+ process_all=False
try: