Megatest

Diff
Login

Differences From Artifact [e3d7e1adb0]:

To Artifact [f437d94aa0]:


3130
3131
3132
3133
3134
3135
3136
3137
3138



3139
3140
3141
3142
3143
3144
3145
3130
3131
3132
3133
3134
3135
3136


3137
3138
3139
3140
3141
3142
3143
3144
3145
3146







-
-
+
+
+







  (db:with-db
   dbstruct #f #f
   (lambda (db)
     (sqlite3:execute db "UPDATE tests SET state='DELETED',status='n/a',comment='' WHERE id=?;" test-id))))

;; 
(define (db:delete-old-deleted-test-records dbstruct)
  (let (;; (run-ids  (db:get-all-run-ids dbstruct))
	(targtime (- (current-seconds)(* 30 24 60 60)))) ;; one month in the past
  (let ((targtime (- (current-seconds)
		     (or (configf:lookup-number *configdat* "setup" "keep-deleted-records")
			 (* 30 24 60 60))))) ;; one month in the past
    (db:with-db
     dbstruct
     0
     #t
     (lambda (db)
       (sqlite3:with-transaction
	db