commented out logs for efficiency
This commit is contained in:
parent
d16fa2c015
commit
4eb334102f
@ -97,17 +97,18 @@ def updateStocks(api_key, logf):
|
|||||||
json.dump(all_stocks_settings, f)
|
json.dump(all_stocks_settings, f)
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
except Exception as e:
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
logf = open('log.txt', "a")
|
#logf = open('log.txt', "a")
|
||||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
#exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||||
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
#fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||||
logf.write(str(e))
|
#logf.write(str(e))
|
||||||
logf.write('. file: ' + fname)
|
#logf.write('. file: ' + fname)
|
||||||
logf.write('. line: ' + str(exc_tb.tb_lineno))
|
#logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||||
logf.write('. type: ' + str(exc_type))
|
#logf.write('. type: ' + str(exc_type))
|
||||||
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
#logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||||
logf.close()
|
#logf.close()
|
||||||
|
|
||||||
def updateCommodities(api_key, logf):
|
def updateCommodities(api_key, logf):
|
||||||
|
|
||||||
@ -142,17 +143,18 @@ def updateCommodities(api_key, logf):
|
|||||||
json.dump(all_commodities_settings, f)
|
json.dump(all_commodities_settings, f)
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
except Exception as e:
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
logf = open('log.txt', "a")
|
#logf = open('log.txt', "a")
|
||||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
#exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||||
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
#fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||||
logf.write(str(e))
|
#logf.write(str(e))
|
||||||
logf.write('. file: ' + fname)
|
#logf.write('. file: ' + fname)
|
||||||
logf.write('. line: ' + str(exc_tb.tb_lineno))
|
#logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||||
logf.write('. type: ' + str(exc_type))
|
#logf.write('. type: ' + str(exc_type))
|
||||||
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
#logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||||
logf.close()
|
#logf.close()
|
||||||
|
|
||||||
|
|
||||||
def updateIndices(api_key, logf):
|
def updateIndices(api_key, logf):
|
||||||
@ -188,17 +190,18 @@ def updateIndices(api_key, logf):
|
|||||||
json.dump(all_indices_settings, f)
|
json.dump(all_indices_settings, f)
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
except Exception as e:
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
logf = open('log.txt', "a")
|
#logf = open('log.txt', "a")
|
||||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
#exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||||
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
#fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||||
logf.write(str(e))
|
#logf.write(str(e))
|
||||||
logf.write('. file: ' + fname)
|
#logf.write('. file: ' + fname)
|
||||||
logf.write('. line: ' + str(exc_tb.tb_lineno))
|
#logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||||
logf.write('. type: ' + str(exc_type))
|
#logf.write('. type: ' + str(exc_type))
|
||||||
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
#logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||||
logf.close()
|
#logf.close()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -249,17 +252,18 @@ def updateCrypto(api_key, logf):
|
|||||||
json.dump(all_crypto_settings, f)
|
json.dump(all_crypto_settings, f)
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
except Exception as e:
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
logf = open('log.txt', "a")
|
#logf = open('log.txt', "a")
|
||||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
#exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||||
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
#fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||||
logf.write(str(e))
|
#logf.write(str(e))
|
||||||
logf.write('. file: ' + fname)
|
#logf.write('. file: ' + fname)
|
||||||
logf.write('. line: ' + str(exc_tb.tb_lineno))
|
#logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||||
logf.write('. type: ' + str(exc_type))
|
#logf.write('. type: ' + str(exc_type))
|
||||||
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
#logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||||
logf.close()
|
#logf.close()
|
||||||
|
|
||||||
def updateForex(api_key, logf):
|
def updateForex(api_key, logf):
|
||||||
|
|
||||||
@ -308,17 +312,17 @@ def updateForex(api_key, logf):
|
|||||||
f = open( "csv/forex_settings.json", 'w+' )
|
f = open( "csv/forex_settings.json", 'w+' )
|
||||||
json.dump(all_forex_settings, f)
|
json.dump(all_forex_settings, f)
|
||||||
f.close()
|
f.close()
|
||||||
except Exception as e:
|
except:
|
||||||
|
pass
|
||||||
logf = open('log.txt', "a")
|
#logf = open('log.txt', "a")
|
||||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
#exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||||
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
#fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||||
logf.write(str(e))
|
#logf.write(str(e))
|
||||||
logf.write('. file: ' + fname)
|
#logf.write('. file: ' + fname)
|
||||||
logf.write('. line: ' + str(exc_tb.tb_lineno))
|
#logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||||
logf.write('. type: ' + str(exc_type))
|
#logf.write('. type: ' + str(exc_type))
|
||||||
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
#logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||||
logf.close()
|
#logf.close()
|
||||||
|
|
||||||
|
|
||||||
def updateNews(api_key, logf):
|
def updateNews(api_key, logf):
|
||||||
@ -371,17 +375,18 @@ def updateNews(api_key, logf):
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
except Exception as e:
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
logf = open('log.txt', "a")
|
#logf = open('log.txt', "a")
|
||||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
#exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||||
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
#fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||||
logf.write(str(e))
|
#logf.write(str(e))
|
||||||
logf.write('. file: ' + fname)
|
#logf.write('. file: ' + fname)
|
||||||
logf.write('. line: ' + str(exc_tb.tb_lineno))
|
#logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||||
logf.write('. type: ' + str(exc_type))
|
#logf.write('. type: ' + str(exc_type))
|
||||||
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
#logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||||
logf.close()
|
#logf.close()
|
||||||
|
|
||||||
|
|
||||||
def updateWeather(api_key, logf):
|
def updateWeather(api_key, logf):
|
||||||
@ -478,17 +483,18 @@ def updateWeather(api_key, logf):
|
|||||||
json.dump( all_daily_settings, f)
|
json.dump( all_daily_settings, f)
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
except Exception as e:
|
except:
|
||||||
logf = open('log.txt', "a")
|
pass
|
||||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
#logf = open('log.txt', "a")
|
||||||
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
#exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||||
logf.write(str(e))
|
#fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||||
logf.write('. file: ' + fname)
|
#logf.write(str(e))
|
||||||
logf.write('. line: ' + str(exc_tb.tb_lineno))
|
#logf.write('. file: ' + fname)
|
||||||
logf.write('. type: ' + str(exc_type))
|
#logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||||
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
#logf.write('. type: ' + str(exc_type))
|
||||||
|
#logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||||
|
|
||||||
logf.close()
|
#logf.close()
|
||||||
|
|
||||||
|
|
||||||
def updateLeagueTables(api_key, logf):
|
def updateLeagueTables(api_key, logf):
|
||||||
@ -546,17 +552,18 @@ def updateLeagueTables(api_key, logf):
|
|||||||
json.dump(all_settings, f)
|
json.dump(all_settings, f)
|
||||||
|
|
||||||
f.close()
|
f.close()
|
||||||
except Exception as e:
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
logf = open('log.txt', "a")
|
#logf = open('log.txt', "a")
|
||||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
#exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||||
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
#fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||||
logf.write(str(e))
|
#logf.write(str(e))
|
||||||
logf.write('. file: ' + fname)
|
#logf.write('. file: ' + fname)
|
||||||
logf.write('. line: ' + str(exc_tb.tb_lineno))
|
#logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||||
logf.write('. type: ' + str(exc_type))
|
#logf.write('. type: ' + str(exc_type))
|
||||||
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
#logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||||
logf.close()
|
#logf.close()
|
||||||
|
|
||||||
|
|
||||||
def updateLeagueEvents(api_key, time, logf):
|
def updateLeagueEvents(api_key, time, logf):
|
||||||
@ -624,16 +631,17 @@ def updateLeagueEvents(api_key, time, logf):
|
|||||||
f = open( "csv/{}_games.json".format(time), 'w+' )
|
f = open( "csv/{}_games.json".format(time), 'w+' )
|
||||||
json.dump(all_settings, f)
|
json.dump(all_settings, f)
|
||||||
f.close()
|
f.close()
|
||||||
except Exception as e:
|
except:
|
||||||
logf = open('log.txt', "a")
|
pass
|
||||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
#logf = open('log.txt', "a")
|
||||||
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
#exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||||
logf.write(str(e))
|
#fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||||
logf.write('. file: ' + fname)
|
#logf.write(str(e))
|
||||||
logf.write('. line: ' + str(exc_tb.tb_lineno))
|
#logf.write('. file: ' + fname)
|
||||||
logf.write('. type: ' + str(exc_type))
|
#logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||||
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
#logf.write('. type: ' + str(exc_type))
|
||||||
logf.close()
|
#logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||||
|
#logf.close()
|
||||||
|
|
||||||
|
|
||||||
def updateSports(api_key, logf):
|
def updateSports(api_key, logf):
|
||||||
@ -996,18 +1004,19 @@ if __name__ == '__main__':
|
|||||||
time.sleep(10)
|
time.sleep(10)
|
||||||
|
|
||||||
|
|
||||||
except Exception as e:
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
logf = open('log.txt', "a")
|
# logf = open('log.txt', "a")
|
||||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
# exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||||
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
# fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||||
logf.write(str(e))
|
# logf.write(str(e))
|
||||||
logf.write('. file: ' + fname)
|
# logf.write('. file: ' + fname)
|
||||||
logf.write('. line: ' + str(exc_tb.tb_lineno))
|
# logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||||
logf.write('. type: ' + str(exc_type))
|
# logf.write('. type: ' + str(exc_type))
|
||||||
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
# logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||||
logf.close()
|
# logf.close()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user