mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-23 00:26:22 +00:00
feat: optimizar acceso a información y ordenar por hostname
This commit is contained in:
parent
43d190ba74
commit
259d1c1e90
1 changed files with 4 additions and 0 deletions
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
# Gestiona los filtros de InstanceModeration
|
# Gestiona los filtros de InstanceModeration
|
||||||
class InstanceModerationProcessor < Rubanok::Processor
|
class InstanceModerationProcessor < Rubanok::Processor
|
||||||
|
prepare do
|
||||||
|
raw.includes(:instance).order('activity_pub_instances.hostname')
|
||||||
|
end
|
||||||
|
|
||||||
map :state, activate_always: true do |state: 'paused'|
|
map :state, activate_always: true do |state: 'paused'|
|
||||||
raw.where(aasm_state: state)
|
raw.where(aasm_state: state)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue