enGMzizo / copy-dynamodb-table

Copy Dynamodb table to another in the same or different zone , It is 100% safe. Speed depends on your destination table user-defined write provisioned throughput
130 stars 38 forks source link

Callback function is not called #33

Closed LudoPL closed 3 years ago

LudoPL commented 3 years ago

Hi ! I am starting using your great tool. It seems to work well except my callback function is not called. I have looked briefly at the code and I wonder if it doesn't come from those lines

if (options.source.active && options.destination.active) { // both tables are active
    return startCopying(options, function (err, data) {
      if (err) {
        return fn(err, data)
      }
      if (options.continuousBackups) {
        setContinuousBackups(options, fn)
      }
    })
  }

I am in the case where both tables are active and options.continuousBackups is false.

LudoPL commented 3 years ago

I have push a PR regarding that issue : https://github.com/enGMzizo/copy-dynamodb-table/pull/34 It fix it for me but I haven't look all the code to ensure there is no similar problem elsewhere.

Thanks for you project !

enGMzizo commented 3 years ago

fixed in https://github.com/enGMzizo/copy-dynamodb-table/releases/tag/v2.2.0