#miru_error

1 messages ยท Page 1 of 1 (latest)

sinful plumeBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1499413484503302234

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

feral pier
#

๐Ÿ‘‹ happy to help

#

you need to wait until the test clock's advancement is done before you can do any other updates

sinful plumeBOT
crystal field
#

Taking over from my colleague. Let me know if you've any follow-up questions

old laurel
#

Hey thanks for the fast reply, and hello ynnoj
That makes sense. But is my understanding correct that its during advancement that events are processed. If WH are listening for these events, they are processed during advancement and for example an sqs listening for these events could trigger a lambda that attempts an update while the testclock is not finished advanceing ? I believe thats happening and im not sure how to wait for testclock to be finished advancing. it needs to advance to trigger renewal.

crystal field
#

Yes, I think any invoice.* and/or customer.subscription.* events would fire during the async advancement process. Can you share the req_xxx ID for the request that failed? Looks like you were trying to modify the clock?

#

im not sure how to wait for testclock to be finished advancing.
You'd listen for the test_helpers.test_clock.ready event as per the doc my colleague shared. Once you receive that and the clock is status: 'ready' then you can advance it again

sinful plumeBOT
old laurel
#

req_9XONWwR5yXXIa6 here is the request ID

crystal field
#

Then yeah, you're going to need to await for the clock to be ready before modifying objects attached to the clock โ€“ either via that event I said, or polling the API

old laurel
#

Right, wait for that event before any sqs triggers a lambda that attempts update

crystal field
#

Yes, or check the clock status via the API in the function before you modify the subscription

old laurel
#

Ok thanks I was hoping I wouldnt have to make any test specific adjustments in business logic but that seems like the only way

crystal field
#

Yeah unfortunately we 'lock' the objects whilst the clock advancements are underway otherwise they could be in a weird state if you're modifying them before the advancement resolves