mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-21 22:27:08 +00:00
Travis
This commit is contained in:
parent
2dae757ad9
commit
58bf6c1655
|
@ -22,4 +22,4 @@ script:
|
|||
env:
|
||||
- DATABASE_URL=postgres://rrr:rrr@localhost/rrr
|
||||
addons:
|
||||
postgresql: "10"
|
||||
postgresql: "9.4"
|
||||
|
|
|
@ -5,7 +5,7 @@ create or replace function hot_rank(
|
|||
returns integer as $$
|
||||
begin
|
||||
-- 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; $$
|
||||
LANGUAGE plpgsql;
|
||||
|
||||
|
|
Loading…
Reference in a new issue