mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-12-25 05:58:06 +00:00
Add ability to refresh app data
This commit is contained in:
parent
711070f414
commit
90d82a7784
|
@ -479,10 +479,20 @@ def clear_application_cache():
|
||||||
global mynode_applications
|
global mynode_applications
|
||||||
mynode_applications = None
|
mynode_applications = None
|
||||||
|
|
||||||
|
def need_application_refresh():
|
||||||
|
global mynode_applications
|
||||||
|
if mynode_applications == None:
|
||||||
|
return True
|
||||||
|
if os.path.isfile("/tmp/need_application_refresh"):
|
||||||
|
os.system("rm /tmp/need_application_refresh")
|
||||||
|
os.system("sync")
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
def get_all_applications(order_by="none"):
|
def get_all_applications(order_by="none"):
|
||||||
global mynode_applications
|
global mynode_applications
|
||||||
|
|
||||||
if mynode_applications == None:
|
if need_application_refresh():
|
||||||
initialize_applications()
|
initialize_applications()
|
||||||
else:
|
else:
|
||||||
update_applications()
|
update_applications()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user