Megatest

Check-in [46182ccbf0]
Login
Overview
Comment:Added error handler for dashboard where it looks for recent accesses to db
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.60
Files: files | file ages | folders
SHA1: 46182ccbf0e3e908f6ac72692329ef4d72d33f6a
User & Date: mrwellan on 2014-10-23 09:17:24
Other Links: branch diff | manifest | tags
Context
2014-10-23
23:51
Added more exception and signal handlers check-in: 086bd3226a user: matt tags: v1.60
18:26
Partial implemenation of correct rerun behaviour check-in: f9f3796ce3 user: mrwellan tags: rerun-behavior-fixes
09:17
Added error handler for dashboard where it looks for recent accesses to db check-in: 46182ccbf0 user: mrwellan tags: v1.60
2014-10-22
11:32
Add exception handler to check for journal files - seems to crap out sometimes check-in: 8d711947e0 user: mrwellan tags: v1.60
Changes

Modified dashboard.scm from [28c632df2d] to [7792f161eb].

1453
1454
1455
1456
1457
1458
1459





1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
(define *last-monitor-update-time* 0)

;; Force creation of the db in case it isn't already there.
(let ((db (tasks:open-db)))
  (sqlite3:finalize! db))

(define (dashboard:get-youngest-run-db-mod-time)





  (apply max (map (lambda (filen)
		    (file-modification-time filen))
		  (glob (conc *dbdir* "/*.db")))))

(define (dashboard:run-update x)
  (let* ((modtime         (dashboard:get-youngest-run-db-mod-time)) ;; (file-modification-time *db-file-path*))
	 (monitor-modtime (if (file-exists? *monitor-db-path*)
			      (file-modification-time *monitor-db-path*)
			      -1))
	 (run-update-time (current-seconds))







>
>
>
>
>
|
|
|







1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
(define *last-monitor-update-time* 0)

;; Force creation of the db in case it isn't already there.
(let ((db (tasks:open-db)))
  (sqlite3:finalize! db))

(define (dashboard:get-youngest-run-db-mod-time)
  (handle-exceptions
   exn
   (begin
     (debug:print 0 "WARNING: error in accessing databases: " ((condition-property-accessor 'exn 'message) exn))
     (current-seconds)) ;; something went wrong - just print an error and return current-seconds
   (apply max (map (lambda (filen)
		     (file-modification-time filen))
		   (glob (conc *dbdir* "/*.db"))))))

(define (dashboard:run-update x)
  (let* ((modtime         (dashboard:get-youngest-run-db-mod-time)) ;; (file-modification-time *db-file-path*))
	 (monitor-modtime (if (file-exists? *monitor-db-path*)
			      (file-modification-time *monitor-db-path*)
			      -1))
	 (run-update-time (current-seconds))