kopia lustrzana https://github.com/dgtlmoon/changedetection.io
Trigger write index after edit of a watch
rodzic
81534d9367
commit
86f2f54abe
|
@ -235,7 +235,7 @@ def api_update():
|
|||
datastore.data['watching'][uuid].update({'url': url,
|
||||
'tag': tag,
|
||||
'headers':extra_headers})
|
||||
|
||||
datastore.needs_write = True
|
||||
|
||||
messages.append({'class': 'ok', 'message': 'Updated watch.'})
|
||||
|
||||
|
|
|
@ -127,6 +127,7 @@ class ChangeDetectionStore:
|
|||
|
||||
|
||||
def sync_to_json(self):
|
||||
print ("Saving index")
|
||||
with open('/datastore/url-watches.json', 'w') as json_file:
|
||||
json.dump(self.data, json_file, indent=4)
|
||||
self.needs_write = False
|
||||
|
|
Ładowanie…
Reference in New Issue