Random Bits of Open Code

Check-in [d214c91865]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Minor stuff.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:d214c918658846b72cf20c9aac1f83baf2213821
User & Date: matt 2018-05-06 17:59:05
Context
2018-05-07
02:30
Extend constraint on runs to include area_id. Respect area name provided by dashboard config file. check-in: 6149f777bb user: matt tags: trunk
2018-05-06
17:59
Minor stuff. check-in: d214c91865 user: matt tags: trunk
10:11
wrong db handle used in database init. check-in: 7ed7a603cd user: matt tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to mtutils/mtdb/mtdb.scm.

242
243
244
245
246
247
248
249
250
251
252



253
254
255
256
257
258
259
....
1235
1236
1237
1238
1239
1240
1241

1242
1243
1244
1245
1246
1247
1248

;;======================================================================
;; Manage the /tmp/ db mirror area (use current directory on Windows)
;;======================================================================

;; Need to consolidate this with a very similar call in mtview.scm.
;;
(define (adat-init adat-in mtpath)
  (let* ((onwin  (common:windows?))
	 (adat   (or adat-in (make-adat)))
	 (aname  (adat-name adat))



	 (apath  (or (adat-path adat)
		     (begin
		       (adat-path-set! adat mtpath)
		       mtpath)))
	 (mtdb   (conc apath "/megatest.db"))
	 (mtcfg  (conc apath "/megatest.config"))
	 (rccfg  (conc apath "/runconfigs.config"))
................................................................................
		  ;; not syncing run stats at this time as they can be derived from tests table.
		  (sync-tests-data adat1 adat2 cached-info test-ids area-info)
					;(exit)   
		  ;; (sync-test-steps adat1 adat2 cached-info test-step-ids)
		  ;; (sync-test-gen-data adat1 adat2 cached-info test-data-ids))
		  ))
	    (write-sync-time common-dbh area-info start)

	    (close-all-dbs adat1)
	    (close-all-dbs adat2)
	    ))) ;; NOTE: Need to extract the max time from the source db and use that
	(if (set-area adat2)
	    (mt1-sync-to-mt2 adat1 adat2)
	    (begin
	      (print-error "ERROR: unable to create an area record")







|


|
>
>
>







 







>







242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
....
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252

;;======================================================================
;; Manage the /tmp/ db mirror area (use current directory on Windows)
;;======================================================================

;; Need to consolidate this with a very similar call in mtview.scm.
;;
(define (adat-init adat-in #!key (mtpath #f)(area-name #f))
  (let* ((onwin  (common:windows?))
	 (adat   (or adat-in (make-adat)))
	 (aname  (or (adat-name adat)
		     (begin
		       (adat-name-set! adat area-name)
		       area-name)))
	 (apath  (or (adat-path adat)
		     (begin
		       (adat-path-set! adat mtpath)
		       mtpath)))
	 (mtdb   (conc apath "/megatest.db"))
	 (mtcfg  (conc apath "/megatest.config"))
	 (rccfg  (conc apath "/runconfigs.config"))
................................................................................
		  ;; not syncing run stats at this time as they can be derived from tests table.
		  (sync-tests-data adat1 adat2 cached-info test-ids area-info)
					;(exit)   
		  ;; (sync-test-steps adat1 adat2 cached-info test-step-ids)
		  ;; (sync-test-gen-data adat1 adat2 cached-info test-data-ids))
		  ))
	    (write-sync-time common-dbh area-info start)
	    (adat-last-refresh-set! adat2 start)
	    (close-all-dbs adat1)
	    (close-all-dbs adat2)
	    ))) ;; NOTE: Need to extract the max time from the source db and use that
	(if (set-area adat2)
	    (mt1-sync-to-mt2 adat1 adat2)
	    (begin
	      (print-error "ERROR: unable to create an area record")