X-Git-Url: https://nos-oignons.net/gitweb/gestion-adh.git/blobdiff_plain/61077092ef62b9f0780c2dce7ef249be0ce4c7e7..3e57bb279787236b1349f6b1da2ecf61ed4211e0:/bin/update-ag-subscribers diff --git a/bin/update-ag-subscribers b/bin/update-ag-subscribers index f10978e..59d5a91 100755 --- a/bin/update-ag-subscribers +++ b/bin/update-ag-subscribers @@ -5,13 +5,6 @@ require 'rubygems' require 'bundler' Bundler.setup -require 'nos_oignons/mailman' -require 'nos_oignons/subscriptions' +require 'nos_oignons' -LIST = 'ag' - -current_emails = NosOignons::Mailman.list_members(LIST) -uptodate_emails = NosOignons::Subscription.all.select(&:up_to_date?).collect(&:email) - -NosOignons::Mailman.add_members(LIST, uptodate_emails - current_emails) -NosOignons::Mailman.remove_members(LIST, current_emails - uptodate_emails) +NosOignons.update_ag_subscribers!