Skip to content
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

Optionally call validation sync (without callback) #51

Open
grimen opened this issue Jan 7, 2013 · 4 comments
Open

Optionally call validation sync (without callback) #51

grimen opened this issue Jan 7, 2013 · 4 comments

Comments

@grimen
Copy link

grimen commented Jan 7, 2013

I've reviewed some JSON Schema validation libraries and found this one solid, but the async-only validation bugs me a lot. I've noticed that most other similar libraries support synchronous calls, and I tried to figure out how much work it would require to make Amanda optionally sync as well but got a bit stuck in the search. How hard would it be to allow sync calls at this stage? Async mostly makes sense for bigger amounts of data, but for most a sync call would make more sense.

@luka5
Copy link
Contributor

luka5 commented Jul 15, 2013

+1 would be great

@ProCynic
Copy link

ProCynic commented Sep 9, 2013

you can get a workaround by passing in function(err) { return err; } as your callback. Every function in amanda does return callback();, so it bubbles all the way back up.

@grimen
Copy link
Author

grimen commented Dec 4, 2013

@ProCynic Thanks, will try that out.

@grimen
Copy link
Author

grimen commented Sep 2, 2014

Never managed to get this to work actually, not sure why - runs async anyway for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants