Report generated on May-21 4:00 pm
Pier last restarted: Tue May 21 12:04:01 UTC 2024
Could be OK - There are unsaved edits, but transactions is not older than persistency duration
(PRScheduledTaskExamples newForKernelNamed: 'Pier') reportOfFile: 'STARTED_PHARO.txt' onPageAt: '/Blog/Social Tasks/Democracy Action/Check Image Save/Report' modifyUsing: [ :str || imageFile transactionFile prefix | prefix := ''. (str isEmpty not and: [ str lines last size > 75 ]) ifTrue: [ prefix := 'Pier last restarted: ', (str lines last copyFrom: 47 to: 74), String crlfcrlf ]. (imageFile := Smalltalk imageFile) exists ifFalse: [ 'Image file does not exist!' ] ifTrue: [ (transactionFile := FileLocator workingDirectory / 'transactions.txt') exists ifFalse: [ 'Transaction file does not exist!' ] ifTrue: [ PRKernel instances size = 1 ifFalse: [ 'Code is not prepared for more than 1 kernel' ] ifTrue: [ (FileSystem disk modificationTimeOf: imageFile) > (FileSystem disk modificationTimeOf: transactionFile) ifTrue: [ prefix, 'A-OK - Image file is newer (' , (FileSystem disk modificationTimeOf: imageFile) asString , ')' ] ifFalse: [ (PRKernel instances anyOne persistency duration > ((FileSystem disk modificationTimeOf: transactionFile) - (FileSystem disk modificationTimeOf: imageFile))) ifTrue: [ prefix, 'Maybe OK - There are edits that have not yet been saved.' ] ifFalse: [ PRKernel instances anyOne persistency duration > (DateAndTime now - (FileSystem disk modificationTimeOf: transactionFile)) ifTrue: [ prefix, 'Could be OK - There are unsaved edits, but transactions is not older than persistency duration' ] ifFalse: [ prefix, 'NOT OK - There are edits that may be lost!' ] ] ] ] ] ] ].
Explaining: