From 82e1e53432fe9377523944baa52b059f93b681ce Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Wed, 1 Aug 2018 09:54:22 -0400 Subject: [PATCH] FIX: slow_query is now happening in report.rb directly --- plugin.rb | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/plugin.rb b/plugin.rb index 99d8d38..341d3a5 100644 --- a/plugin.rb +++ b/plugin.rb @@ -277,18 +277,10 @@ after_initialize do values = [] - timeout = wrap_slow_query do - values = PluginStoreRow.where(plugin_name: 'staff_notes') - .where("value::json->0->>'created_at'>?", report.start_date) - .where("value::json->0->>'created_at'0->>'created_at'>?", report.start_date) + .where("value::json->0->>'created_at'