Amanda icon indicating copy to clipboard operation
Amanda copied to clipboard

Optionally call `validation` sync (without callback)

Open grimen opened this issue 12 years ago • 4 comments

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.

grimen avatar Jan 07 '13 17:01 grimen

+1 would be great

luka5 avatar Jul 15 '13 19:07 luka5

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.

ProCynic avatar Sep 09 '13 19:09 ProCynic

@ProCynic Thanks, will try that out.

grimen avatar Dec 04 '13 20:12 grimen

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

grimen avatar Sep 02 '14 03:09 grimen