Remove debug

merge-requests/8/head
Bob Mottram 2020-10-09 13:52:56 +01:00
parent 53ed0774e6
commit 513d0784e4
2 changed files with 0 additions and 6 deletions

View File

@ -2925,15 +2925,11 @@ def createBoxIndexed(recentPostsCache: {},
# that this post is moderated
arrivalDate = \
locateNewsArrival(baseDir, domain, postFilename)
print('Arrival: ' + str(arrivalDate))
if arrivalDate:
print('Arrival: date ' + str(arrivalDate))
# how long has elapsed since this post arrived?
currDate = datetime.datetime.utcnow()
timeDiffMins = \
int((currDate - arrivalDate).total_seconds() / 60)
print('Arrival: mins ' + \
str(timeDiffMins) + ' ' + str(votingTimeMins))
# has the voting time elapsed?
if timeDiffMins < votingTimeMins:
# voting is still happening, so don't add this

View File

@ -552,11 +552,9 @@ def locateNewsArrival(baseDir: str, domain: str,
accountDir = baseDir + '/accounts/news@' + domain + '/'
postFilename = accountDir + 'outbox/' + postUrl
print('Arrival: ' + str(postFilename))
if os.path.isfile(postFilename):
with open(postFilename, 'r') as arrivalFile:
arrival = arrivalFile.read()
print('Arrival: content ' + str(arrival))
if arrival:
arrivalDate = \
datetime.datetime.strptime(arrival,