Enzo před 1 rokem
rodič
revize
3cf8ccde58
2 změnil soubory, kde provedl 5 přidání a 7 odebrání
  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()