Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
mastofe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Pleroma
mastofe
Commits
ea200a17
Unverified
Commit
ea200a17
authored
4 years ago
by
Takeshi Umeda
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix migration 20200407202420_migrate_unavailable_inboxes (#13481)
parent
3825e194
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
db/migrate/20200407202420_migrate_unavailable_inboxes.rb
+7
-2
7 additions, 2 deletions
db/migrate/20200407202420_migrate_unavailable_inboxes.rb
with
7 additions
and
2 deletions
db/migrate/20200407202420_migrate_unavailable_inboxes.rb
+
7
−
2
View file @
ea200a17
...
...
@@ -4,8 +4,13 @@ class MigrateUnavailableInboxes < ActiveRecord::Migration[5.2]
def
up
urls
=
Redis
.
current
.
smembers
(
'unavailable_inboxes'
)
urls
.
each
do
|
url
|
host
=
Addressable
::
URI
.
parse
(
url
).
normalized_host
hosts
=
urls
.
map
do
|
url
|
Addressable
::
URI
.
parse
(
url
).
normalized_host
end
.
compact
.
uniq
UnavailableDomain
.
delete_all
hosts
.
each
do
|
host
|
UnavailableDomain
.
create
(
domain:
host
)
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment