mirror of
https://github.com/withastro/astro.git
synced 2025-01-27 22:19:04 -05:00
remove token wait time (#10477)
This commit is contained in:
parent
0ddc327ee8
commit
124cdd64f2
2 changed files with 5 additions and 4 deletions
5
.changeset/small-crabs-look.md
Normal file
5
.changeset/small-crabs-look.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@astrojs/db": patch
|
||||
---
|
||||
|
||||
Remove redundant wait time on token creation
|
|
@ -62,10 +62,6 @@ class ManagedRemoteAppToken implements ManagedAppToken {
|
|||
throw new Error(`Failed to create token: ${res.status} ${res.statusText}`);
|
||||
}
|
||||
);
|
||||
// Wait for 2 seconds! This is the maximum time we would reasonably expect a token
|
||||
// to be created and propagate to all the necessary DB services. Without this, you
|
||||
// risk a token being created, used immediately, and failing to authenticate.
|
||||
await new Promise((resolve) => setTimeout(resolve, 2000));
|
||||
spinner.succeed(green('Connected to remote database.'));
|
||||
|
||||
const { token, ttl } = await response.json();
|
||||
|
|
Loading…
Add table
Reference in a new issue