Hi.
My gems: carrierwave, whenever
I would like to remove from server photos uploaded 30 days ago.

I should use runner ?

every 1.day, :at => '4:30 am' do
runner "MyPhotoModel.remove_after_30_days"
end
How to remove files .jpg from server using runner?

Should I remove records in photo table??


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/Da4_-1qEodsJ.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

  • Walter Lee Davis at Feb 8, 2012 at 5:34 pm

    On Feb 7, 2012, at 7:45 PM, regedarek wrote:

    Hi.
    My gems: carrierwave, whenever
    I would like to remove from server photos uploaded 30 days ago.

    I should use runner ?

    every 1.day, :at => '4:30 am' do
    runner "MyPhotoModel.remove_after_30_days"
    end

    How to remove files .jpg from server using runner?

    Should I remove records in photo table??
    I haven't used CarrierWave yet, but many of the other file attachment gems delete the underlying file when the the corresponding object is destroyed. Try this in console --

    Photo.first.destroy

    Then look in your file folder to see if the matching file is actually gone.

    Walter

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedFeb 8, '12 at 12:46a
activeFeb 8, '12 at 5:34p
posts2
users2
websiterubyonrails.org
irc#RubyOnRails

2 users in discussion

Walter Lee Davis: 1 post Regedarek: 1 post

People

Translate

site design / logo © 2022 Grokbase