Adds a rake task to remove expired tokens: redmine:tokens:prune.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9422 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
0cb633c688
commit
147f717c86
@ -15,12 +15,18 @@
|
|||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
desc 'Removes uploaded files left unattached after one day.'
|
|
||||||
|
|
||||||
namespace :redmine do
|
namespace :redmine do
|
||||||
namespace :attachments do
|
namespace :attachments do
|
||||||
|
desc 'Removes uploaded files left unattached after one day.'
|
||||||
task :prune => :environment do
|
task :prune => :environment do
|
||||||
Attachment.prune
|
Attachment.prune
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
namespace :tokens do
|
||||||
|
desc 'Removes expired tokens.'
|
||||||
|
task :prune => :environment do
|
||||||
|
Token.destroy_expired
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user