summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-15 15:56:58 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-15 15:56:58 +0000
commit147f717c86286edf5e0b52f2f30f2da841997c0d (patch)
tree23e682952e375d9503ca9a90ee50421fc9716b9b
parent0cb633c6881c8f4eb7e0d267d65ba17b0d477fa2 (diff)
downloadredmine-147f717c86286edf5e0b52f2f30f2da841997c0d.tar.gz
redmine-147f717c86286edf5e0b52f2f30f2da841997c0d.zip
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
-rw-r--r--lib/tasks/redmine.rake10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/tasks/redmine.rake b/lib/tasks/redmine.rake
index 0b61cd691..72ff31d65 100644
--- a/lib/tasks/redmine.rake
+++ b/lib/tasks/redmine.rake
@@ -15,12 +15,18 @@
# along with this program; if not, write to the Free Software
# 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 :attachments do
+ desc 'Removes uploaded files left unattached after one day.'
task :prune => :environment do
Attachment.prune
end
end
+
+ namespace :tokens do
+ desc 'Removes expired tokens.'
+ task :prune => :environment do
+ Token.destroy_expired
+ end
+ end
end