effective_mailchimp 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1080e126c3adae745b754f92a4d54345e6d7b758c26d0b3bb96848a6776fe5f
|
4
|
+
data.tar.gz: 1e9e4262626919069be09aabe1b22cae71a1347441f6b7dce5c8d03edbad8c27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc048e3944864ecb187be8855c010bdd50f87f85f97c7a59f9e6e44261a507ffc7e81a96eb08967a96a8b92a3bc37dc0da2cb7b666a3b980d51d2be34db49253
|
7
|
+
data.tar.gz: 6cf8f0e6d611bdf1d57c1ea2312588622cbb14f121039a94e8d336ee5ef9ad9f6b21abf7768fabc65057267538b14b262cd9648e141bae85094c4c98ca2969ed
|
@@ -26,7 +26,9 @@ module EffectiveMailchimpUser
|
|
26
26
|
accepts_nested_attributes_for :mailchimp_lists, allow_destroy: true
|
27
27
|
|
28
28
|
# The user updated the form
|
29
|
-
after_commit(if: -> { mailchimp_user_form_action })
|
29
|
+
after_commit(if: -> { mailchimp_user_form_action }) do
|
30
|
+
EffectiveMailchimpUpdateJob.perform_later(self)
|
31
|
+
end
|
30
32
|
end
|
31
33
|
|
32
34
|
# Intended for app to extend
|
@@ -107,11 +109,13 @@ module EffectiveMailchimpUser
|
|
107
109
|
|
108
110
|
return if lists.length == mailchimp_list_members.length && !(force || mailchimp_sync_required?)
|
109
111
|
|
110
|
-
lists.
|
111
|
-
|
112
|
+
Timeout::timeout(lists.length * 2) do
|
113
|
+
lists.each do |mailchimp_list|
|
114
|
+
member = build_mailchimp_list_member(mailchimp_list: mailchimp_list)
|
112
115
|
|
113
|
-
|
114
|
-
|
116
|
+
list_member = api.list_member(mailchimp_list, email) || {}
|
117
|
+
member.assign_mailchimp_attributes(list_member)
|
118
|
+
end
|
115
119
|
end
|
116
120
|
|
117
121
|
mailchimp_list_members.each do |member|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_mailchimp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
@@ -197,6 +197,7 @@ files:
|
|
197
197
|
- app/controllers/admin/mailchimp_lists_controller.rb
|
198
198
|
- app/datatables/admin/effective_mailchimp_lists_datatable.rb
|
199
199
|
- app/helpers/effective_mailchimp_helper.rb
|
200
|
+
- app/jobs/effective_mailchimp_update_job.rb
|
200
201
|
- app/models/concerns/effective_mailchimp_user.rb
|
201
202
|
- app/models/effective/mailchimp_api.rb
|
202
203
|
- app/models/effective/mailchimp_list.rb
|