Try to wait one second for each attribute you're adding.
Hmm okay, I can try that
Actually wait
I might try to add some more elegant error handling
I can try / catch the errors when creating indexes and retry automatically until it completes
Yes, that can work
You can even try and use this https://appwrite.io/docs/server/databases?sdk=nodejs-default#databasesGetAttribute To see if you're getting the attribute
Oh nice idea
Yeah
Then maybe something like this.
while(true){
try {
await databases.getAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '');
break;
} catch (e) {
await sleep(1000);
}
}
Right yeah! Thanks 😄
FYI, at the moment, there are some times throughout the day where these operations can take up to 30 minutes to complete
Oh wow. Is this only the case if there's a lot of data in the collections already?
In my case the collections will always be empty when I'm running this.
no. there are some database operations that lock up the database 😕 we're working on improving this
Okay, shoot. This limitation would kind of render my creation for the hackathon unusable I'm afraid.
What kind of ETA do you think can be expected on this?
Any chance it's before the hackathon ends? 😂
This limitation would kind of render my creation for the hackathon unusable I'm afraid.
Do you only have 1 project?
What kind of ETA do you think can be expected on this?
Sorry, I don't have an ETA
Yeah just the one project, it's basically done except for this part I was doing last night.
I do have it working and it was feeling fine with my tests last night, but I'll likely need to think of a different way to handle this knowing of this limitation.
@Steven would I be able to DM you to provide more details that are currently kind of private?
Perhaps you'll see a way of working around the issue
so the 30 minute delay will only happen once a day...and it's at the same time every day 😬
asynchronously handling creates with some sort of retry later would be the best approach
@Steven yeah I'm wondering if maybe I can schedule it as a function or something and have some features disabled until the indexes are created
Like on a recurring cron or something
Still not ideal but it'd work in the meantime
Would it be appropriate to provide you with a better context over DM @Steven?
sure
Recommended threads
- All My Project is Gone
Hello everyone, please help. Why have all my projects suddenly disappeared? I received a warning via email about one of my projects being paused. When I clicked...
- > AppwriteException: The requested servi...
When trying to read or write from my database I get the following error: > AppwriteException: The requested service is disabled. You can enable the service from...
- Courtesy limit reset for non-profit migr...
Hi Team! I'm the architect for a 501(c)(3) non-profit project (Aaria's Blue Elephant) and we just hit our Free plan Database Read limit (currently at 164%). Th...