mattyschell / geodatabase-replication-toiler

Creative Commons Zero v1.0 Universal
1 stars 0 forks source link

Add logging and error handling to punk file transfer #29

Open mattyschell opened 1 year ago

mattyschell commented 1 year ago

We occasionally see the file transfer from source to target just die without erroring. It's not a big file, 500MB zipped.

The error in the createpunkreplica-replicaname-xxxx-xxx.log logs is not vebose, just

INFO:root:Creating baby publicsafety replica from D:\XX\FGDB\xxx.gdb INFO:root:Synchronizing baby //xxx/xxx/xxxx.gdb replica from D:\xxx\xxx\xxxx.gdb

Add better logging here and maybe try, catch and re-try.

mattyschell commented 1 year ago

Additionally, add more info in the failure report to indicate the environment where we have issues.

Right now users must parse a message like:

Failed to replicate D:\XX\XX\xxx.gdb to //xxx-xxx.xx.nycnet/xx/xxx.gdb at 2023-07-20 00:20:58.386065

mattyschell commented 1 year ago

Partially addressed in 61a4c1a

mattyschell commented 1 year ago

Next up:

As we learn which activities under punkreplica.synchronize()

https://github.com/mattyschell/geodatabase-replication-toiler/blob/27598ffa06bdfb0e7dd0acd0e7dcd86480c712d9/src/py/punkreplica.py#L82

periodically fail we will wrap that particular exception to catch more details and report it out.

This is already done in the create() method here, follow the pattern

https://github.com/mattyschell/geodatabase-replication-toiler/blob/27598ffa06bdfb0e7dd0acd0e7dcd86480c712d9/src/py/punkreplica.py#L66