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
- Weird permission failure
when creating an account I use following methods: ``` Future<void> register(String email, String password, String username) async { final user = await accoun...
- Appwrite Storage error 503s for automate...
I'm facing error 503s from Appwrite after about 5-6 seconds of making AI requests from my tool with images and files above 20MB (=> not inline base64 used, but ...
- Flutter Android oAuth is no more working
I currently don't get the oAuth login to work in flutter android. it works on ios and on web. but when try to use it on Android, i get to the point where the ca...