INNER CODE UNIT · Python
api_update_check
GodsScion/Auto_job_applier_linkedIn · app.py:508
def api_update_check():
'''
The local version vs the published one. Reports "no update" rather than an
error when the check fails, so being offline is invisible to the user. The
UI calls this after the page is interactive, so it never delays startup.
'''
latest = updater.latest_version()
current = updater.current_version()
return jsonify({"current": current, "latest": latest,
"update_available": updater.is_newer(latest, current)})
@app.route('/api/update', methods=['POST'])
def api_update():
'''Saves the live settings, then fast-forwards this clone to the newest commit.'''
try:
_freeze_config()
except OSError as err: