Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit0996698

Browse files
committed
feat(community): inc community contribute digest up to 30 days
1 parent45aa12e commit0996698

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

‎config/config.exs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ config :groupher_server, :general,
3838
page_size:30,
3939
inner_page_size:5,
4040
# today is not include
41-
community_contribute_days:7,
41+
community_contribute_days:30,
4242
user_contribute_months:6,
4343
default_subscribed_communities:20,
4444
publish_throttle_interval_minutes:3,

‎test/groupher_server/statistics/statistics_test.exs‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,23 +124,23 @@ defmodule GroupherServer.Test.Statistics do
124124
@tag:wip
125125
test"should return recent#{@community_contribute_days} days community contributes by default",
126126
~m(community)ado
127-
seven_days_ago=Timex.shift(Timex.today(),days:-@community_contribute_days)
128-
seven_more_days_ago=Timex.shift(seven_days_ago,days:-1)
127+
days_ago=Timex.shift(Timex.today(),days:-@community_contribute_days)
128+
more_days_ago=Timex.shift(days_ago,days:-1)
129129

130130
Repo.insert_all(CommunityContribute,[
131131
%{
132132
community_id:community.id,
133-
date:seven_days_ago,
133+
date:days_ago,
134134
count:1,
135-
inserted_at:seven_days_ago|>Timex.to_datetime(),
136-
updated_at:seven_days_ago|>Timex.to_datetime()
135+
inserted_at:days_ago|>Timex.to_datetime(),
136+
updated_at:days_ago|>Timex.to_datetime()
137137
},
138138
%{
139139
community_id:community.id,
140-
date:seven_more_days_ago,
140+
date:more_days_ago,
141141
count:1,
142-
inserted_at:seven_more_days_ago|>Timex.to_datetime(),
143-
updated_at:seven_more_days_ago|>Timex.to_datetime()
142+
inserted_at:more_days_ago|>Timex.to_datetime(),
143+
updated_at:more_days_ago|>Timex.to_datetime()
144144
}
145145
])
146146

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp