Add delivery failure handling to FASP jobs (#35723)
This commit is contained in:
97
db/schema.rb
97
db/schema.rb
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[8.0].define(version: 2025_07_17_003848) do
|
||||
ActiveRecord::Schema[8.0].define(version: 2025_08_05_075010) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pg_catalog.plpgsql"
|
||||
|
||||
@@ -488,6 +488,7 @@ ActiveRecord::Schema[8.0].define(version: 2025_07_17_003848) do
|
||||
t.string "fediverse_account"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.datetime "delivery_last_failed_at"
|
||||
t.index ["base_url"], name: "index_fasp_providers_on_base_url", unique: true
|
||||
end
|
||||
|
||||
@@ -1483,53 +1484,6 @@ ActiveRecord::Schema[8.0].define(version: 2025_07_17_003848) do
|
||||
add_foreign_key "web_settings", "users", name: "fk_11910667b2", on_delete: :cascade
|
||||
add_foreign_key "webauthn_credentials", "users", on_delete: :cascade
|
||||
|
||||
create_view "instances", materialized: true, sql_definition: <<-SQL
|
||||
WITH domain_counts(domain, accounts_count) AS (
|
||||
SELECT accounts.domain,
|
||||
count(*) AS accounts_count
|
||||
FROM accounts
|
||||
WHERE (accounts.domain IS NOT NULL)
|
||||
GROUP BY accounts.domain
|
||||
)
|
||||
SELECT domain_counts.domain,
|
||||
domain_counts.accounts_count
|
||||
FROM domain_counts
|
||||
UNION
|
||||
SELECT domain_blocks.domain,
|
||||
COALESCE(domain_counts.accounts_count, (0)::bigint) AS accounts_count
|
||||
FROM (domain_blocks
|
||||
LEFT JOIN domain_counts ON (((domain_counts.domain)::text = (domain_blocks.domain)::text)))
|
||||
UNION
|
||||
SELECT domain_allows.domain,
|
||||
COALESCE(domain_counts.accounts_count, (0)::bigint) AS accounts_count
|
||||
FROM (domain_allows
|
||||
LEFT JOIN domain_counts ON (((domain_counts.domain)::text = (domain_allows.domain)::text)));
|
||||
SQL
|
||||
add_index "instances", "reverse(('.'::text || (domain)::text)), domain", name: "index_instances_on_reverse_domain"
|
||||
add_index "instances", ["domain"], name: "index_instances_on_domain", unique: true
|
||||
|
||||
create_view "user_ips", sql_definition: <<-SQL
|
||||
SELECT user_id,
|
||||
ip,
|
||||
max(used_at) AS used_at
|
||||
FROM ( SELECT users.id AS user_id,
|
||||
users.sign_up_ip AS ip,
|
||||
users.created_at AS used_at
|
||||
FROM users
|
||||
WHERE (users.sign_up_ip IS NOT NULL)
|
||||
UNION ALL
|
||||
SELECT session_activations.user_id,
|
||||
session_activations.ip,
|
||||
session_activations.updated_at
|
||||
FROM session_activations
|
||||
UNION ALL
|
||||
SELECT login_activities.user_id,
|
||||
login_activities.ip,
|
||||
login_activities.created_at
|
||||
FROM login_activities
|
||||
WHERE (login_activities.success = true)) t0
|
||||
GROUP BY user_id, ip;
|
||||
SQL
|
||||
create_view "account_summaries", materialized: true, sql_definition: <<-SQL
|
||||
SELECT accounts.id AS account_id,
|
||||
mode() WITHIN GROUP (ORDER BY t0.language) AS language,
|
||||
@@ -1580,4 +1534,51 @@ ActiveRecord::Schema[8.0].define(version: 2025_07_17_003848) do
|
||||
SQL
|
||||
add_index "global_follow_recommendations", ["account_id"], name: "index_global_follow_recommendations_on_account_id", unique: true
|
||||
|
||||
create_view "instances", materialized: true, sql_definition: <<-SQL
|
||||
WITH domain_counts(domain, accounts_count) AS (
|
||||
SELECT accounts.domain,
|
||||
count(*) AS accounts_count
|
||||
FROM accounts
|
||||
WHERE (accounts.domain IS NOT NULL)
|
||||
GROUP BY accounts.domain
|
||||
)
|
||||
SELECT domain_counts.domain,
|
||||
domain_counts.accounts_count
|
||||
FROM domain_counts
|
||||
UNION
|
||||
SELECT domain_blocks.domain,
|
||||
COALESCE(domain_counts.accounts_count, (0)::bigint) AS accounts_count
|
||||
FROM (domain_blocks
|
||||
LEFT JOIN domain_counts ON (((domain_counts.domain)::text = (domain_blocks.domain)::text)))
|
||||
UNION
|
||||
SELECT domain_allows.domain,
|
||||
COALESCE(domain_counts.accounts_count, (0)::bigint) AS accounts_count
|
||||
FROM (domain_allows
|
||||
LEFT JOIN domain_counts ON (((domain_counts.domain)::text = (domain_allows.domain)::text)));
|
||||
SQL
|
||||
add_index "instances", "reverse(('.'::text || (domain)::text)), domain", name: "index_instances_on_reverse_domain"
|
||||
add_index "instances", ["domain"], name: "index_instances_on_domain", unique: true
|
||||
|
||||
create_view "user_ips", sql_definition: <<-SQL
|
||||
SELECT user_id,
|
||||
ip,
|
||||
max(used_at) AS used_at
|
||||
FROM ( SELECT users.id AS user_id,
|
||||
users.sign_up_ip AS ip,
|
||||
users.created_at AS used_at
|
||||
FROM users
|
||||
WHERE (users.sign_up_ip IS NOT NULL)
|
||||
UNION ALL
|
||||
SELECT session_activations.user_id,
|
||||
session_activations.ip,
|
||||
session_activations.updated_at
|
||||
FROM session_activations
|
||||
UNION ALL
|
||||
SELECT login_activities.user_id,
|
||||
login_activities.ip,
|
||||
login_activities.created_at
|
||||
FROM login_activities
|
||||
WHERE (login_activities.success = true)) t0
|
||||
GROUP BY user_id, ip;
|
||||
SQL
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user