update for new recommender service changes
This commit is contained in:
@@ -10,7 +10,7 @@ module RecommenderService
|
||||
def available_for_post?(post)
|
||||
return true if Rails.env.development?
|
||||
|
||||
enabled? && CurrentUser.enable_recommended_posts? && post.created_at > Date.civil(2018, 1, 1) && post.score >= SCORE_THRESHOLD
|
||||
enabled? && CurrentUser.enable_recommended_posts? && post.created_at > Date.civil(2017, 1, 1) && post.fav_count >= SCORE_THRESHOLD
|
||||
end
|
||||
|
||||
def available_for_user?
|
||||
@@ -34,7 +34,7 @@ module RecommenderService
|
||||
end
|
||||
|
||||
def recommend_for_post(post_id)
|
||||
ids = Cache.get("rss:#{post_id}", 1.day) do
|
||||
ids = Cache.get("rss:#{post_id}", 1.hour) do
|
||||
resp = HTTParty.get(
|
||||
"#{Danbooru.config.recommender_server}/similar/#{post_id}",
|
||||
Danbooru.config.httparty_options.merge(
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div id="a-index">
|
||||
<h1>Recommended Posts</h1>
|
||||
|
||||
<p>Based on your voting history, you may enjoy these posts. Vote more to get more accurate results. These recommendations update every hour.</p>
|
||||
<p>Based on your favorites, you may enjoy these posts. Favorite more to get more accurate results. These recommendations update every hour.</p>
|
||||
|
||||
<%= render partial: "show" %>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user