diff --git a/roles/cmdsrv/files/iiab-cmdsrv b/roles/cmdsrv/files/iiab-cmdsrv index 984807e5..0e21f769 100644 --- a/roles/cmdsrv/files/iiab-cmdsrv +++ b/roles/cmdsrv/files/iiab-cmdsrv @@ -1881,7 +1881,7 @@ def get_last_jobs_stat(cmd_info): db_lock.acquire() # will block if lock is already held try: conn = sqlite3.connect(cmdsrv_dbpath) - cur = conn.execute ("SELECT jobs.rowid, job_command, job_output, job_status, strftime('%s',jobs.create_datetime), strftime('%s',last_update_datetime), strftime('%s','now'), cmd_msg FROM jobs, commands where cmd_rowid = commands.rowid ORDER BY jobs.rowid DESC LIMIT 30") + cur = conn.execute ("SELECT jobs.rowid, job_command, job_output, job_status, strftime('%s',jobs.create_datetime), strftime('%s',last_update_datetime), strftime('%s','now', 'localtime'), cmd_msg FROM jobs, commands where cmd_rowid = commands.rowid ORDER BY jobs.rowid DESC LIMIT 30") last_jobs = cur.fetchall() conn.close() except sqlite3.Error, e: diff --git a/roles/cmdsrv/templates/scripts/get_kiwix_catalog b/roles/cmdsrv/templates/scripts/get_kiwix_catalog index 8719e491..721e7c34 100644 --- a/roles/cmdsrv/templates/scripts/get_kiwix_catalog +++ b/roles/cmdsrv/templates/scripts/get_kiwix_catalog @@ -49,18 +49,19 @@ kiwix_catalog = jsonPath + "/kiwix_catalog.json" if verbose: print "Starting xml download from Kiwix" -try: - xmlsrc = urllib2.urlopen(kiwixLibUrl) - portable_tree = ET.parse(xmlsrc) - xmlsrc.close() - if verbose: - print "library.xml received from Kiwix" -except (urllib2.URLError) as exc: - if verbose: - print "Error getting library.xml from Kiwix" - sys.stdout.write("GET-KIWIX-CAT ERROR - " + str(exc.reason)) - sys.stdout.flush() - sys.exit(1) +# As of 9/26/2018 we stop using zims from http://download.kiwix.org/portable/ as Kiwix intends to remove it +#try: +# xmlsrc = urllib2.urlopen(kiwixLibUrl) +# portable_tree = ET.parse(xmlsrc) +# xmlsrc.close() +# if verbose: +# print "library.xml received from Kiwix" +#except (urllib2.URLError) as exc: +# if verbose: +# print "Error getting library.xml from Kiwix" +# sys.stdout.write("GET-KIWIX-CAT ERROR - " + str(exc.reason)) +# sys.stdout.flush() +# sys.exit(1) try: xmlsrc = urllib2.urlopen(kiwixZimLibUrl) @@ -86,7 +87,7 @@ zimCount = 0 def main(): global portable_list, zimCount zimCount = 0 - portable_list = xml_to_list(portable_tree.getroot()) + # portable_list = xml_to_list(portable_tree.getroot()) #zim_dict = xml_to_dict(zim_tree.getroot()) #portable_dict = xml_to_dict(portable_tree.getroot()) diff --git a/roles/cmdsrv/templates/scripts/get_oer2go_catalog b/roles/cmdsrv/templates/scripts/get_oer2go_catalog index cfe632a7..f5ac034d 100644 --- a/roles/cmdsrv/templates/scripts/get_oer2go_catalog +++ b/roles/cmdsrv/templates/scripts/get_oer2go_catalog @@ -42,7 +42,7 @@ iiab_oer2go_catalog = {} oer2go_cat_url = 'http://dev.worldpossible.org/cgi/json_api_v1.pl' rachel_mods_url = "rsync://dev.worldpossible.org/rachelmods/" -iiab_cat_url = "http://medbox.iiab.me/catalog/iiab_catalog.json" +iiab_cat_url = "http://med.iiab.me/catalog/iiab_catalog.json" # output files