X-Git-Url: https://nos-oignons.net/gitweb/gestion-adh.git/blobdiff_plain/13767cc69697b7eaf4be6e47788efe636b56b6fd..9abd734720ddad01338b0556ed6210bac5c5b145:/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!