Recovering changes after GT malfunction and image restarting.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2022-04-06 12:46:32 -05:00
parent 062a0ac309
commit 69941fbcfb
2 changed files with 6 additions and 3 deletions

View File

@ -1,8 +1,11 @@
accessing accessing
storeContents storeContents
| objectString directory tempFile oldFile | | objectString directory tempFile oldFile dehidratated |
objectString := STON toStringPretty: self.
dehidratated := self copy.
dehidratated tweets: nil.
objectString := STON toStringPretty: dehidratated.
directory := (FileLocator userData / 'Socialmetrica' / self userName) ensureCreateDirectory. directory := (FileLocator userData / 'Socialmetrica' / self userName) ensureCreateDirectory.
oldFile := directory / self userName, 'ston'. oldFile := directory / self userName, 'ston'.

View File

@ -1,4 +1,4 @@
accessing accessing
store store
self class storeDB. "Starting the ReStore singleton." ReStore isConnected ifFalse: [ self class storeDB]. "Starting the ReStore singleton."
self tweets do: [:each | ReStore evaluateAsTransaction: [ each store ] ]. self tweets do: [:each | ReStore evaluateAsTransaction: [ each store ] ].