sbecker / asset_packager

JavaScript and CSS Asset Compression for Production Rails Apps
http://synthesis.sbecker.net/pages/asset_packager
517 stars 102 forks source link

Google Closure: Error(22): Too many compiles performed recently. Try again later. #23

Closed camelpunch closed 8 years ago

camelpunch commented 13 years ago

We have several apps that get deployed in serial. When using Google's Closure service to compile JS, the resulting JavaScript files contained only the following:

Error(22): Too many compiles performed recently. Try again later.

This was obviously causing catastrophic failure with our JS. To avoid this problem, perhaps asset_packager should check for the presence of this string in resulting JS files and re-try after a set period?

camelpunch commented 13 years ago

Hmm, since the period you'd have to wait would be an hour, my solution seems a bit silly. It'd be better to raise an error I think, and work this into the JSmin-fallback.