Sha256: c121c7893769df2aa5c786bf0f235452bfc0c667f2aca8555425c0ea26eeb372
Contents?: true
Size: 607 Bytes
Versions: 62
Compression:
Stored size: 607 Bytes
Contents
module Workarea module Insights class NonSellers < Base class << self def dashboards %w(catalog) end def generate_weekly! results = generate_results create!(results: results.map(&:as_document)) if results.present? end def generate_results Metrics::ProductByWeek .last_week .where(:orders.lt => 1, :views.gt => 0) .order_by(views: :desc, _id: :asc) .limit(Workarea.config.insights_products_list_max_results) .to_a end end end end end
Version data entries
62 entries across 62 versions & 1 rubygems