Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F886078
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Aug 8, 8:43 PM
Size
617 B
Mime Type
text/x-diff
Expires
Sun, Aug 10, 8:43 PM (15 h, 17 m)
Engine
blob
Format
Raw Data
Handle
246036
Attached To
rWEBDNS WebDNS (edet4)
View Options
diff --git a/lib/tasks/cleanup.rake b/lib/tasks/cleanup.rake
index 9aaf91e..58d4b3a 100644
--- a/lib/tasks/cleanup.rake
+++ b/lib/tasks/cleanup.rake
@@ -1,14 +1,16 @@
namespace :cleanup do
desc "Cleanup completed jobs"
task :jobs => :environment do
count = Job.completed.count - WebDNS.settings[:completed_jobs_count]
count = count < 0 ? 0 : count
+ puts "Will remove %s jobs" % count
Job.completed.order(created_at: :desc).limit(count).destroy_all
+ puts "Done"
end
# add new jobs here too
task :all => [:jobs]
end
desc "Cleanup everything"
task :cleanup => 'cleanup:all'
Event Timeline
Log In to Comment