mirror of https://gitlab.com/bashrc2/epicyon
Remove debug
parent
53ed0774e6
commit
513d0784e4
4
posts.py
4
posts.py
|
@ -2925,15 +2925,11 @@ def createBoxIndexed(recentPostsCache: {},
|
||||||
# that this post is moderated
|
# that this post is moderated
|
||||||
arrivalDate = \
|
arrivalDate = \
|
||||||
locateNewsArrival(baseDir, domain, postFilename)
|
locateNewsArrival(baseDir, domain, postFilename)
|
||||||
print('Arrival: ' + str(arrivalDate))
|
|
||||||
if arrivalDate:
|
if arrivalDate:
|
||||||
print('Arrival: date ' + str(arrivalDate))
|
|
||||||
# how long has elapsed since this post arrived?
|
# how long has elapsed since this post arrived?
|
||||||
currDate = datetime.datetime.utcnow()
|
currDate = datetime.datetime.utcnow()
|
||||||
timeDiffMins = \
|
timeDiffMins = \
|
||||||
int((currDate - arrivalDate).total_seconds() / 60)
|
int((currDate - arrivalDate).total_seconds() / 60)
|
||||||
print('Arrival: mins ' + \
|
|
||||||
str(timeDiffMins) + ' ' + str(votingTimeMins))
|
|
||||||
# has the voting time elapsed?
|
# has the voting time elapsed?
|
||||||
if timeDiffMins < votingTimeMins:
|
if timeDiffMins < votingTimeMins:
|
||||||
# voting is still happening, so don't add this
|
# voting is still happening, so don't add this
|
||||||
|
|
2
utils.py
2
utils.py
|
@ -552,11 +552,9 @@ def locateNewsArrival(baseDir: str, domain: str,
|
||||||
|
|
||||||
accountDir = baseDir + '/accounts/news@' + domain + '/'
|
accountDir = baseDir + '/accounts/news@' + domain + '/'
|
||||||
postFilename = accountDir + 'outbox/' + postUrl
|
postFilename = accountDir + 'outbox/' + postUrl
|
||||||
print('Arrival: ' + str(postFilename))
|
|
||||||
if os.path.isfile(postFilename):
|
if os.path.isfile(postFilename):
|
||||||
with open(postFilename, 'r') as arrivalFile:
|
with open(postFilename, 'r') as arrivalFile:
|
||||||
arrival = arrivalFile.read()
|
arrival = arrivalFile.read()
|
||||||
print('Arrival: content ' + str(arrival))
|
|
||||||
if arrival:
|
if arrival:
|
||||||
arrivalDate = \
|
arrivalDate = \
|
||||||
datetime.datetime.strptime(arrival,
|
datetime.datetime.strptime(arrival,
|
||||||
|
|
Loading…
Reference in New Issue