Pulses crash when the server is starting up
Possibly the cache has not been generated yet and we are not waiting for it. Should either wait for cache or protect from crash.
Request: POST /api/my/pulses
** (exit) an exception was raised:
** (ArgumentError) argument error
(stdlib) :ets.update_counter(:cache_service_language_xp_cache, {"JSON", :total}, {2, 4}, {{"JSON", :total}, 4})
(code_stats) lib/code_stats/cache_service.ex:47: CodeStats.CacheService.add_total_language_xp/2
(elixir) lib/enum.ex:651: Enum."-each/2-lists^foreach/1-0-"/2
(elixir) lib/enum.ex:651: Enum.each/2
(code_stats) web/controllers/pulse_controller.ex:142: CodeStats.PulseController.update_caches/1
(code_stats) web/controllers/pulse_controller.ex:31: CodeStats.PulseController.add/2
(code_stats) web/controllers/pulse_controller.ex:1: CodeStats.PulseController.action/2
(code_stats) web/controllers/pulse_controller.ex:1: CodeStats.PulseController.phoenix_controller_pipeline/2