merge-requests/30/head
Bob Mottram 2020-01-13 11:13:30 +00:00
parent 62cdede3be
commit b994d534a2
1 changed files with 7 additions and 0 deletions

View File

@ -53,18 +53,25 @@ def updatePostSchedule(baseDir: str,handle: str,httpd,maxScheduledPosts: int) ->
(postTime - datetime.datetime(1970,1,1)).days
print('DEBUG: schedule postTime hour='+str(postTime.time().hour))
print('DEBUG: schedule postTime minute='+str(postTime.time().minute))
print('DEBUG: schedule daysSinceEpoch='+str(daysSinceEpoch))
print('DEBUG: schedule postDaysSinceEpoch='+str(postDaysSinceEpoch))
if daysSinceEpoch < postDaysSinceEpoch:
print('DEBUG: schedule not yet date')
continue
if currTime.time().hour < postTime.time().hour:
print('DEBUG: schedule not yet hour')
continue
if currTime.time().minute < postTime.time().minute:
print('DEBUG: schedule not yet minute')
continue
if not os.path.isfile(postFilename):
print('WARN: schedule postFilename='+postFilename)
indexLines.remove(line)
continue
# load post
postJsonObject=loadJson(postFilename)
if not postJsonObject:
print('WARN: schedule json not loaded')
indexLines.remove(line)
continue