mercredi 28 mars 2018

How to handle downtime of external app in rails code

in one of my rails application, I am using the gem which would generate a model by parsing some json from some external API. Now there is some downtime for those API and we are not able to access it which would also cause downtime for my application. I need to handle this situation programmatically so my application would not go down even though there is no data received from the corresponding API. I am trying to reproduce the same situation in my local environment and I am facing the following error. anyone can help me to overcome this issue

Web application could not be started

No such file or directory - dev20177.service-now.com/change_request.do?displayvalue=all&WSDL (Errno::ENOENT) /home/sunny.bogawat/.rvm/gems/ruby-1.9.3-p374@vp2/gems/wasabi-3.2.3/lib/wasabi/resolver.rb:50:in read' /home/sunny.bogawat/.rvm/gems/ruby-1.9.3-p374@vp2/gems/wasabi-3.2.3/lib/wasabi/resolver.rb:50:inload_from_disc' /home/sunny.bogawat/.rvm/gems/ruby-1.9.3-p374@vp2/gems/wasabi-3.2.3/lib/wasabi/resolver.rb:34:in resolve' /home/sunny.bogawat/.rvm/gems/ruby-1.9.3-p374@vp2/gems/wasabi-3.2.3/lib/wasabi/document.rb:141:inxml' /home/sunny.bogawat/.rvm/gems/ruby-1.9.3-p374@vp2/gems/wasabi-3.2.3/lib/wasabi/document.rb:159:in parse' /home/sunny.bogawat/.rvm/gems/ruby-1.9.3-p374@vp2/gems/wasabi-3.2.3/lib/wasabi/document.rb:146:inparser' /home/sunny.bogawat/.rvm/gems/ruby-1.9.3-p374@vp2/bundler/gems/sgtools_sncdws-3f0838938142/lib/service_now-dws/record.rb:46:in setup' /home/sunny.bogawat/.rvm/gems/ruby-1.9.3-p374@vp2/bundler/gems/sgtools_sncdws-3f0838938142/lib/service_now-dws/plugin/config.rb:94:inblock in gen_models' /home/sunny.bogawat/.rvm/gems/ruby-1.9.3-p374@vp2/bundler/gems/sgtools_sncdws-3f0838938142/lib/service_now-dws/plugin/config.rb:89:in each' /home/sunny.bogawat/.rvm/gems/ruby-1.9.3-p374@vp2/bundler/gems/sgtools_sncdws-3f0838938142/lib/service_now-dws/plugin/config.rb:89:ingen_models' /home/sunny.bogawat/.rvm/gems/ruby-1.9.3-p374@vp2/bundler/gems/sgtools_itsm-e753bf5bc899/lib/sgtools_itsm.rb:39:in gen_models' /home/sunny.bogawat/.rvm/gems/ruby-1.9.3-p374@vp2/bundler/gems/sgtools_rails_itsm-bc3dcdf43e87/lib/sgtools/rails/itsm/engine.rb:25:inblock in ' /home/sunny.bogawat/.rvm/gems/ruby-1.9.3-p374@vp2/gems/railties-3.2.21/lib/rails/initializable.rb:30:in instance_exec' /home/sunny.bogawat/.rvm/gems/ruby-1.9.3-p374@vp2/gems/railties-3.2.21/lib/rails/initializable.rb:30:inrun' /home/sunny.bogawat/.rvm/gems/ruby-1.9.3-p374@vp2/gems/railties-3.2.21/lib/rails/initializable.rb:55:in block in run_initializers' /home/sunny.bogawat/.rvm/gems/ruby-1.9.3-p374@vp2/gems/railties-3.2.21/lib/rails/initializable.rb:54:ineach' /home/sunny.bogawat/.rvm/gems/ruby-1.9.3-p374@vp2/gems/railties-3.2.21/lib/rails/initializable.rb:54:in run_initializers' /home/sunny.bogawat/.rvm/gems/ruby-1.9.3-p374@vp2/gems/railties-3.2.21/lib/rails/application.rb:136:ininitialize!' /home/sunny.bogawat/.rvm/gems/ruby-1.9.3-p374@vp2/gems/railties-3.2.21/lib/rails/railtie/configurable.rb:30:in method_missing' /home/sunny.bogawat/work/viewpoint/config/environment.rb:9:in' config.ru:3:in require' config.ru:3:inblock in ' /home/sunny.bogawat/.rvm/gems/ruby-1.9.3-p374@vp2/gems/rack-1.4.7/lib/rack/builder.rb:51:in instance_eval' /home/sunny.bogawat/.rvm/gems/ruby-1.9.3-p374@vp2/gems/rack-1.4.7/lib/rack/builder.rb:51:ininitialize' config.ru:1:in new' config.ru:1:in' /usr/local/rvm/gems/ruby-1.9.3-p484@httpd24/gems/passenger-4.0.29/helper-scripts/rack-preloader.rb:108:in eval' /usr/local/rvm/gems/ruby-1.9.3-p484@httpd24/gems/passenger-4.0.29/helper-scripts/rack-preloader.rb:108:inpreload_app' /usr/local/rvm/gems/ruby-1.9.3-p484@httpd24/gems/passenger-4.0.29/helper-scripts/rack-preloader.rb:153:in <module:App>' /usr/local/rvm/gems/ruby-1.9.3-p484@httpd24/gems/passenger-4.0.29/helper-scripts/rack-preloader.rb:29:in' /usr/local/rvm/gems/ruby-1.9.3-p484@httpd24/gems/passenger-4.0.29/helper-scripts/rack-preloader.rb:28:in `' Application root

Aucun commentaire:

Enregistrer un commentaire