Bladeren bron

static sync

Enzo 1 jaar geleden
bovenliggende
commit
3cf8ccde58
2 gewijzigde bestanden met toevoegingen van 5 en 7 verwijderingen
  1. 2 0
      services/synchronization.service.ts
  2. 3 7
      test/test3a.ts

+ 2 - 0
services/synchronization.service.ts

@@ -42,6 +42,8 @@ export class MessageSyncrhonizationService implements MessageSynchronisationServ
             this.compareResult(data).then((data) => {
                 const obs : Observable<any> = of(...data)
                 obs.subscribe(subjectOutput)
+                // log remaining data?
+                this.targetSrc.subscribe(obs)
             })
         }).catch((e) => console.error(e))
 

+ 3 - 7
test/test3a.ts

@@ -100,6 +100,8 @@ function initializeData() {
 }
 
 /*  Type 1 synchronization */
+/* Please note that this operation assumes that there's already existing data in the designated storage place. It still cannot perform real-time live streaming dynamically
+when there is a streaming occuring.  */
 source_synchronize.init(settings).then(() => {
     source_synchronize.subscribe(source_payload_string).then((data) => {
         data.subscribe({
@@ -112,11 +114,5 @@ source_synchronize.init(settings).then(() => {
     })
 })
 
-// synch.subscribe({
-//     next: (data) => {
-//         target_payload_subject.next(data)
-//         console.log(data)
-//     }
-// })
-
+/*  Run this code to pluck some data into the database. 4 in File storage and 2 in Mongo */
 // initializeData()