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