| 
														
															@@ -6,10 +6,17 @@ module Blazer 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     workers 4 
														 | 
														
														 | 
														
															     workers 4 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     def perform(result, data_source, statement, options) 
														 | 
														
														 | 
														
															     def perform(result, data_source, statement, options) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      ActiveRecord::Base.connection_pool.with_connection do 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        data_source.connection_model.connection_pool.with_connection do 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-          result << RunStatement.new.perform(data_source, statement, options) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      begin 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        ActiveRecord::Base.connection_pool.with_connection do 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+          data_source.connection_model.connection_pool.with_connection do 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            result << RunStatement.new.perform(data_source, statement, options) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+          end 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         end 
														 | 
														
														 | 
														
															         end 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      rescue Exception => e 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        result.clear 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        result << Blazer::Result.new(data_source, [], [], "Unknown error", nil, false) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        Blazer.cache.write(data_source.run_cache_key(options[:run_id]), Marshal.dump([[], [], "Unknown error", nil]), expires_in: 30.seconds) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        raise e 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       end 
														 | 
														
														 | 
														
															       end 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     end 
														 | 
														
														 | 
														
															     end 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   end 
														 | 
														
														 | 
														
															   end 
														 |