Skip to content

Commit

Permalink
Remove background job to deploy on render
Browse files Browse the repository at this point in the history
  • Loading branch information
ElsonOtake committed Nov 29, 2023
1 parent faf92a0 commit f61403d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions app/controllers/concerns/track_event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ module TrackEvent
extend ActiveSupport::Concern

def track_event
# puts "************************** size #{session[:comment_size]}"
CreateCounterJob.perform_async(session[:action], session[:post_author])
event = CounterAnalytic.where(action: session[:action], member_id: session[:post_author]).first_or_create!
event.count += 1
event.save!
end
end
2 changes: 1 addition & 1 deletion app/views/analytics/_counter_analytics.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
created: counter_analytic.created_at.strftime("%Y-%m-%d"),
count: counter_analytic.count
} do %>
<p>
<p class="is-hidden">
Action: <%= counter_analytic.action %>
Count: <%= counter_analytic.count %>
created: <%= counter_analytic.created_at %>
Expand Down

0 comments on commit f61403d

Please sign in to comment.