mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-23 06:58:52 +00:00
Travis
This commit is contained in:
parent
a63c86c0cc
commit
24bdae28d7
|
@ -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