diff options
author | href <href@random.sh> | 2019-01-24 16:15:13 +0100 |
---|---|---|
committer | href <href@random.sh> | 2019-01-24 16:53:14 +0100 |
commit | a3ba72d97849ba12a5ea4008bd0b97e80bdd588b (patch) | |
tree | d340fb1e26ea74ff89f840783334e81446c0f1c8 /priv | |
parent | be43aa2875e08cd48b10fc0157d71239f098d1e4 (diff) | |
download | pleroma-a3ba72d97849ba12a5ea4008bd0b97e80bdd588b.tar.gz pleroma-a3ba72d97849ba12a5ea4008bd0b97e80bdd588b.zip |
Fix clippy with one/five lines
Diffstat (limited to 'priv')
-rw-r--r-- | priv/repo/migrations/20181218172826_users_and_activities_flake_id.exs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/priv/repo/migrations/20181218172826_users_and_activities_flake_id.exs b/priv/repo/migrations/20181218172826_users_and_activities_flake_id.exs index 848d507e5..47d2d02da 100644 --- a/priv/repo/migrations/20181218172826_users_and_activities_flake_id.exs +++ b/priv/repo/migrations/20181218172826_users_and_activities_flake_id.exs @@ -70,16 +70,18 @@ defmodule Pleroma.Repo.Migrations.UsersAndActivitiesFlakeId do """ end + flush() + stop_clippy_heartbeats(clippy) end defp start_clippy_heartbeats() do count = from(a in "activities", select: count(a.id)) |> Repo.one! - pid = if count > 5000 do + if count > 5000 do heartbeat_interval = :timer.minutes(2) + :timer.seconds(30) all_tips = Clippy.tips() ++ [ - "The migration is still running, maybe it's time for another tea?", + "The migration is still running, maybe it's time for another “tea”?", "Happy rabbits practice a cute behavior known as a\n“binky:” they jump up in the air\nand twist\nand spin around!", "Nothing and everything.\n\nI still work.", "Pleroma runs on a Raspberry Pi!\n\n … but this migration will take forever if you\nactually run on a raspberry pi", @@ -104,7 +106,7 @@ defmodule Pleroma.Repo.Migrations.UsersAndActivitiesFlakeId do [:red, :bright, "It looks like you are running an older instance!"], [""], [:bright, "This migration may take a long time", :reset, " -- so you probably should"], - ["go drink a coffee, or a tea, or a beer, a whiskey, a vodka,"], + ["go drink a cofe, or a tea, or a beer, a whiskey, a vodka,"], ["while it runs to deal with your temporary fediverse pause!"] ] :timer.sleep(heartbeat_interval) |