mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-25 15:39:11 +00:00
Travis
This commit is contained in:
parent
2dae757ad9
commit
58bf6c1655
|
@ -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