-
-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Async support #865
Comments
@fracz this library mostly relies on classic hooks and callbacks approach. Most of the changes will be done in the package internally with a goal to minimize changes within the integration guidelines |
@dr-dimitru Not sure I understand this correctly. Do you mean you will not change the current API, but the underlying implementation will change? @fracz You can always try |
@make-github-pseudonymous-again yes, I don't see many changes in library's API |
|
No changes need on the client, keep using callback API it would remain working as expected |
@bratelefant also there's no |
That is true, sorry for that confusion. However, using
Edit: Also, if one calls |
@bratelefant just warnings for now, we will update codebase after fibers phased out completely |
Also, it would be really nice if in the |
@bratelefant @dr-dimitru would that imply there is no way to prepare migration until the full 3.0 is out? I think we have already some very sophisticated Alpha Releases (as of today the latest is 3.0.0-alpha.15) and I would like to slowly start migrating Files as well, especially since we do lots of stuff after upload (ffmpeg etc.) |
I agree, I think it would be really nice to get things going, since there'll be some time needed to do some proper testing files in a staging env, especially if you're using s3 or similar things.
|
@dr-dimitru you accepting pull requests for this one? @bratelefant interested in collabroating on a PR for this? |
@jankapunkt sure, if you or someone else ready for this. Willing to help and assist as well |
@jankapunkt sounds fun ;) I personally always considered meteor-files rather complicated, maybe since I didn't really get it as a beginner... this could be a good opportunity to better understand this package. |
@bratelefant or we go together working on its successor in a simpler implementation 😅 |
@dr-dimitru , i'm running across an async issue using the interceptDownload method when trying to migrate to Meteor 3.0 async calls. Using async/await below doesn't wait for the return true. Is it possible to add support for async in preparation for Meteor. 3.0.
|
@dr-dimitru @jankapunkt @bratelefant is there a PR in the works for this? We're currently migrating to Meteor 3, and file uploads and downloads are core to the product. |
@dallman2 we are working on it today, sorry for the delay and thank you for the ping |
Sorry, not yet; it's on my list though |
Dunno if it's worth own issue or better putting it here. Found interesting problem with the So we are using export const getImages = new ValidatedMethod({
name: 'assets.getImages',
validate: () => {},
run() {
console.log(AssetsCollection.find().fetch())
return AssetsCollection.find().fetch();
},
}); Calling Then if method is called like BUT if the same methods is called like Tried doing the same with regular collections and it works as expected, no publish, no data out. So suspecting this might be something to do with how files collection is implemented. This feels like potentially a massive issue once meteor 3 rolls out fully 🫠🫣 |
@chmelevskij I am not sure I understand your example. If this is a method, then it should return the contents of the collection independently of any publication/subscription. Are you talking about the method simulation on the client or the execution of the method on the server? |
Riiiiiiggghhhht.... Ok, nvm me here 🫣 Had fundamental gap in my knowledge here, thanks for pointing it out. |
I'm working on a fork, added async functions to Any hints on testing or linting? Ok, guess I just give it a shot and come up with PR, for work in progress and as a starting point for discussions. |
Meteor 2.8+ is rushing to get rid of fiber and replace everything with *Async. Docs: https://guide.meteor.com/2.8-migration.html
Do you plan to support it in the
FilesCollection
, too? I.e.writeAsync
,findOneAsync
,forEachAsync
.I don't really understand the consequences of using the current non-async
FilesCollection
methods in a meteor async method. Nevertheless, it seems to work.The text was updated successfully, but these errors were encountered: