This website works better with JavaScript.
Home
Explore
Help
Sign In
closed-social
/
mastodon
Watch
3
Star
0
Fork
2
Code
Issues
5
Pull Requests
0
Projects
0
Releases
3
Wiki
Activity
Browse Source
Fixes
#6584
(
#6585
)
pull/4/head
Thomas Leister
6 years ago
committed by
Eugen Rochko
parent
64f2ada5d4
commit
ecd36c1ede
1 changed files
with
4 additions
and
2 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+4
-2
lib/tasks/mastodon.rake
+ 4
- 2
lib/tasks/mastodon.rake
View File
@ -476,8 +476,10 @@ namespace :mastodon do
time_ago
=
ENV
.
fetch
(
'NUM_DAYS'
)
{
7
}
.
to_i
.
days
.
ago
MediaAttachment
.
where
.
not
(
remote_url
:
''
)
.
where
.
not
(
file_file_name
:
nil
)
.
where
(
'created_at < ?'
,
time_ago
)
.
find_each
do
|
media
|
media
.
file
.
destroy
media
.
save
if
media
.
file
.
exists?
media
.
file
.
destroy
media
.
save
end
end
end
Write
Preview
Loading…
Cancel
Save