Megatest

Diff
Login

Differences From Artifact [8f38efeeb9]:

To Artifact [fb78945487]:


1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
	(let* ((last-sync-time (if (args:get-arg "-since") (string->number (args:get-arg "-since")) (vector-ref area-info 3)))
	       (smallest-last-update-time  (make-hash-table))
               (changed      (if (and target run-name)
                            (rmt:get-run-record-ids target run-name (rmt:get-keys) test-patt)
                            (rmt:get-changed-record-ids last-sync-time)))
	       (run-ids        (alist-ref 'runs       changed))
	       (test-ids       (alist-ref 'tests      changed))
	       (test-step-ids  (alist-ref 'test_steps changed))
	       (test-data-ids  (alist-ref 'test_data  changed))
	       (run-stat-ids   (alist-ref 'run_stats  changed))
               (area-tag    (if (args:get-arg "-area-tag") 
                                 (args:get-arg "-area-tag")
                                 (if (args:get-arg "-area") 
                                   (args:get-arg "-area") 
                                   ""))))

           (debug:print-info 0 *default-log-port* "changed records since "  (time->string (seconds->local-time last-sync-time) "%m/%d %H:%M") ": " changed)







<
<
<







1163
1164
1165
1166
1167
1168
1169



1170
1171
1172
1173
1174
1175
1176
	(let* ((last-sync-time (if (args:get-arg "-since") (string->number (args:get-arg "-since")) (vector-ref area-info 3)))
	       (smallest-last-update-time  (make-hash-table))
               (changed      (if (and target run-name)
                            (rmt:get-run-record-ids target run-name (rmt:get-keys) test-patt)
                            (rmt:get-changed-record-ids last-sync-time)))
	       (run-ids        (alist-ref 'runs       changed))
	       (test-ids       (alist-ref 'tests      changed))



               (area-tag    (if (args:get-arg "-area-tag") 
                                 (args:get-arg "-area-tag")
                                 (if (args:get-arg "-area") 
                                   (args:get-arg "-area") 
                                   ""))))

           (debug:print-info 0 *default-log-port* "changed records since "  (time->string (seconds->local-time last-sync-time) "%m/%d %H:%M") ": " changed)
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
            )

          )
          (if (not (null? test-ids))
            (begin
              (debug:print-info 0 *default-log-port*  "syncing tests: " test-ids)
	      (tasks:sync-tests-data dbh cached-info test-ids area-info smallest-last-update-time)
              (debug:print-info 0 *default-log-port*  "syncing test steps")
              (tasks:sync-test-steps dbh cached-info test-step-ids smallest-last-update-time)
	      (debug:print-info 0 *default-log-port*  "syncing test data")
              (tasks:sync-test-gen-data dbh cached-info test-data-ids smallest-last-update-time)
            )
          )
          (let*  ((smallest-time (hash-table-ref/default smallest-last-update-time "smallest-time" (current-seconds))))
             (debug:print-info 0 "smallest-time :" smallest-time  " last-sync-time " last-sync-time)
             (if (not (and target run-name)) 
	       (if (or (and smallest-time (> smallest-time last-sync-time)) (and smallest-time (eq? last-sync-time 0)))
		 (pgdb:write-sync-time dbh area-info smallest-time))







<
<
<
<







1187
1188
1189
1190
1191
1192
1193




1194
1195
1196
1197
1198
1199
1200
            )

          )
          (if (not (null? test-ids))
            (begin
              (debug:print-info 0 *default-log-port*  "syncing tests: " test-ids)
	      (tasks:sync-tests-data dbh cached-info test-ids area-info smallest-last-update-time)




            )
          )
          (let*  ((smallest-time (hash-table-ref/default smallest-last-update-time "smallest-time" (current-seconds))))
             (debug:print-info 0 "smallest-time :" smallest-time  " last-sync-time " last-sync-time)
             (if (not (and target run-name)) 
	       (if (or (and smallest-time (> smallest-time last-sync-time)) (and smallest-time (eq? last-sync-time 0)))
		 (pgdb:write-sync-time dbh area-info smallest-time))