FIx table name for changes.
diff --git a/data.go b/data.go index d261023..b317a8d 100644 --- a/data.go +++ b/data.go
@@ -140,8 +140,7 @@ func updatelocal_fs_location(depID, local_fs_location string) error { - // TODO DEMO ONLY - access_url := "http://localhost:9090/blob/" + depID + access_url := config.GetString("api_listen") + "/blob/" + depID stmt, err := getDB().Prepare(` INSERT INTO edgex_blob_available (blob_id, local_fs_location, access_url) VALUES (?, ?, ?)`)
diff --git a/listener.go b/listener.go index 95d20f4..570332f 100644 --- a/listener.go +++ b/listener.go
@@ -11,7 +11,7 @@ const ( APIGEE_SYNC_EVENT = "ApigeeSync" - DEPLOYMENT_TABLE = "edgex.deployment" + CONFIG_METADATA_TABLE = "project.runtime_blob_metadata" ) func initListener(services apid.Services) { @@ -79,11 +79,12 @@ func processChangeList(changes *common.ChangeList) { + log.Debugf("Processing changes") // changes have been applied to DB var insertedDeployments, deletedDeployments []DataDeployment for _, change := range changes.Changes { switch change.Table { - case DEPLOYMENT_TABLE: + case CONFIG_METADATA_TABLE: switch change.Operation { case common.Insert: dep, err := dataDeploymentFromRow(change.NewRow)