From e02a5d01f60383ca1c23997779edc1c667a02ab7 Mon Sep 17 00:00:00 2001 From: evilhero Date: Fri, 10 Nov 2017 20:11:18 -0500 Subject: [PATCH] FIX: Fix for Mylar usage behind reverse proxy not returning properly on a Recreate Pullist, IMP: Removed some unnecessary logging lines from the weekly pull logging --- mylar/webserve.py | 1 - mylar/weeklypull.py | 18 +++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/mylar/webserve.py b/mylar/webserve.py index 9255f76c..ce651c72 100644 --- a/mylar/webserve.py +++ b/mylar/webserve.py @@ -1779,7 +1779,6 @@ class WebInterface(object): myDB.action("DELETE FROM weekly WHERE weeknumber=? AND year=?", [weeknumber, year]) logger.info("Deleted existed pull-list data for week %s, %s. Now Recreating the Pull-list..." % (weeknumber, year)) weeklypull.pullit(forcecheck, weeknumber, year) - raise cherrypy.HTTPRedirect("pullist") pullrecreate.exposed = True def upcoming(self): diff --git a/mylar/weeklypull.py b/mylar/weeklypull.py index 51acd6aa..e3253809 100755 --- a/mylar/weeklypull.py +++ b/mylar/weeklypull.py @@ -862,15 +862,14 @@ def new_pullcheck(weeknumber, pullyear, comic1off_name=None, comic1off_id=None, if len(watchlist) > 0: for watch in watchlist: listit = [pls for pls in pullist if str(pls) == str(watch['ComicID'])] - logger.info('watchCOMICID:%s / listit: %s' % (watch['ComicID'], listit)) if 'Present' in watch['ComicPublished'] or (helpers.now()[:4] in watch['ComicPublished']) or watch['ForceContinuing'] == 1 or len(listit) >0: # this gets buggered up when series are named the same, and one ends in the current # year, and the new series starts in the same year - ie. Avengers # lets' grab the latest issue date and see how far it is from current # anything > 45 days we'll assume it's a false match ;) - logger.fdebug("ComicName: " + watch['ComicName']) + #logger.fdebug("ComicName: " + watch['ComicName']) latestdate = watch['LatestDate'] - logger.fdebug("latestdate: " + str(latestdate)) + #logger.fdebug("latestdate: " + str(latestdate)) if latestdate[8:] == '': if '-' in latestdate[:4] and not latestdate.startswith('20'): #pull-list f'd up the date by putting '15' instead of '2015' causing 500 server errors @@ -892,15 +891,15 @@ def new_pullcheck(weeknumber, pullyear, comic1off_name=None, comic1off_id=None, #refresh series here and then continue. n_date = datetime.date.today() - logger.fdebug("c_date : " + str(c_date) + " ... n_date : " + str(n_date)) + #logger.fdebug("c_date : " + str(c_date) + " ... n_date : " + str(n_date)) recentchk = (n_date - c_date).days - logger.fdebug("recentchk: " + str(recentchk) + " days") + #logger.fdebug("recentchk: " + str(recentchk) + " days") chklimit = helpers.checkthepub(watch['ComicID']) - logger.fdebug("Check date limit set to : " + str(chklimit)) - logger.fdebug(" ----- ") + #logger.fdebug("Check date limit set to : " + str(chklimit)) + #logger.fdebug(" ----- ") if recentchk < int(chklimit) or watch['ForceContinuing'] == 1 or len(listit) > 0: if watch['ForceContinuing'] == 1: - logger.fdebug('Forcing Continuing Series enabled for series...') + logger.fdebug('Forcing Continuing Series enabled for %s [%s]' % (watch['ComicName'],watch['ComicID'])) # let's not even bother with comics that are not in the Present. Altload = helpers.LoadAlternateSearchNames(watch['AlternateSearch'], watch['ComicID']) if Altload == 'no results' or Altload is None: @@ -930,7 +929,8 @@ def new_pullcheck(weeknumber, pullyear, comic1off_name=None, comic1off_id=None, 'AlternateNames': altnames, 'AnnualIDs': annual_ids}) else: - logger.fdebug("Determined to not be a Continuing series at this time.") + pass + #logger.fdebug("Determined to not be a Continuing series at this time.") if len(weeklylist) >= 1: kp = []