mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-27 06:41:18 +00:00
Travis
This commit is contained in:
parent
a63c86c0cc
commit
24bdae28d7
2 changed files with 2 additions and 2 deletions
|
@ -22,4 +22,4 @@ script:
|
||||||
env:
|
env:
|
||||||
- DATABASE_URL=postgres://rrr:rrr@localhost/rrr
|
- DATABASE_URL=postgres://rrr:rrr@localhost/rrr
|
||||||
addons:
|
addons:
|
||||||
postgresql: "10"
|
postgresql: "9.4"
|
||||||
|
|
|
@ -5,7 +5,7 @@ create or replace function hot_rank(
|
||||||
returns integer as $$
|
returns integer as $$
|
||||||
begin
|
begin
|
||||||
-- hours_diff:=EXTRACT(EPOCH FROM (timezone('utc',now()) - published))/3600
|
-- hours_diff:=EXTRACT(EPOCH FROM (timezone('utc',now()) - published))/3600
|
||||||
return 10000*sign(score)*log(1 + abs(score)) / power(((EXTRACT(EPOCH FROM (timezone('utc',now()) - published))/3600) + 2), 1.8);
|
return floor(10000*sign(score)*log(1 + abs(score)) / power(((EXTRACT(EPOCH FROM (timezone('utc',now()) - published))/3600) + 2), 1.8))::integer;
|
||||||
end; $$
|
end; $$
|
||||||
LANGUAGE plpgsql;
|
LANGUAGE plpgsql;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue