Skip to content

Commit

Permalink
Hotfix/3.1.0 (#240)
Browse files Browse the repository at this point in the history
* Orion v3.1.0 (#238)

* Add granular permissions support for Gateway operator users (#231)

* Add granular permissions support for Gateway operator users

* fix lint issues

* revert docker-compose port change

* mark 'grantPermissions' & 'revokePermissions' input fields are non-nullable & return new permissions instead of boolean

* Set Channel Weight (`setChannelsWeights`) mutation (#232)

* Add granular permissions support for Gateway operator users

* fix lint issues

* add mutation to set channel weight/bias for homepage video relevance

* revert docker-compose port change

* mark 'grantPermissions' & 'revokePermissions' input fields are non-nullable & return new permissions instead of boolean

* bump package version

* update global migration counter map

* bumped package version & updated CHANGELOG

---------

Co-authored-by: Ignazio Bovo <ignazio@jsgenesis.com>

* Postgres performance improvements (#235)

* add index in video.createdAt field

* add pg_stat_extenstion extenstion for queries stats

* docs: ✨ changelog and fix data-js (#237)

---------

Co-authored-by: Zeeshan Akram <37098720+zeeshanakram3@users.noreply.github.com>

* fix: 🚑 hotfix default value for channel weight no matter what

---------

Co-authored-by: Zeeshan Akram <37098720+zeeshanakram3@users.noreply.github.com>
  • Loading branch information
ignazio-bovo and zeeshanakram3 authored Nov 14, 2023
1 parent f9387ae commit bd3e96e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/VideoRelevanceManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export class VideoRelevanceManager {
[joystreamTimestampWeight, ytTimestampWeight] = [7, 3],
defaultChannelWeight,
] = await config.get(ConfigVariable.RelevanceWeights, em)
const channelWeight = defaultChannelWeight ?? 1
await em.query(`
WITH weighted_timestamp AS (
SELECT
Expand Down Expand Up @@ -63,7 +64,7 @@ export class VideoRelevanceManager {
(views_num * ${viewsWeight}) +
(comments_count * ${commentsWeight}) +
(reactions_count * ${reactionsWeight})
) * COALESCE(CW, ${defaultChannelWeight}),
) * COALESCE(CW, ${channelWeight}),
2)
FROM
weighted_timestamp
Expand Down

0 comments on commit bd3e96e

Please sign in to comment.