wesselt / bunq2ynab

Upload bunq transactions to ynab
Other
75 stars 20 forks source link

Total of 7 syncs being done for one transaction #5

Closed JoostGadellaa closed 6 years ago

JoostGadellaa commented 6 years ago

After one transaction the program receives a total of 7 incoming calls, and thus carries out 7 syncs, at 1 minute intervals. I guess this is the effect of ynab retrying because it does not receive a response via a secured connection?

JoostGadellaa commented 6 years ago

I'm currently working on an extra line that checks for duplicates before carrying out a sync

wesselt commented 6 years ago

Right, a machine behind a NAT router cannot have a valid SSL certificate. So the auto_sync script listens for incoming TCP connections. Bunq will retry a number of times (the documentation says 5 retries.)

I don't think 5 calls are expensive for YNAB, and storing state comes with a whole new world of possible problems. So I'd rather do the 5 syncs.

You can comment on certificate-less notifications here: https://together.bunq.com/topic/api-callback-zonder-domein-naam-of-certificaat

JoostGadellaa commented 6 years ago

Yeah I tried having some sort of cooldown time after a succesfull transaction, but that just renders the thing useless for 7 minutes after every transaction. I guess 7 syncs is just the way it goes for now.