wco_email 0.1.1.110 → 0.1.1.111

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c170fe41b3f7c1c83478084a749938e85f2f7667fea798bb268e83f2b7335df6
4
- data.tar.gz: 9f1fd7f6a14c211881e6b11d894b47a26551767b633e61b82154d0a2c7392f2e
3
+ metadata.gz: 38f8aaddeacdef1f099ba697b9c2b85f03512ed5aef52b32b7eb23cb0866db76
4
+ data.tar.gz: 5640567df989b3a1f55ab35846d107abfeba342f7f54c6c97234e4c8883c2b55
5
5
  SHA512:
6
- metadata.gz: 1531fb06fa3c88edeb04fde54ade95d7a22ebb02bbcbfcc4eb75460b8d3d537ae188cef559108de5f9972ef4e28968432b713e3b030668a5b09363a7cb9d38cb
7
- data.tar.gz: de5fbe83b6fb1f7271bb565e4b61b8f7d9bf0547aadbb9a8cba80012a460da1dbfbad5f3019416d62b87ac6c5730764d871a39463c22df7df116e027d21080dd
6
+ metadata.gz: ebb20a03f9d596a6417b773f7852833b0ea24f10377560eba3a2f01fb5b39c236bc61ab48df68849dcf3137ca3db4e8dcb6e6e9248856a84a6e3aefb5474c48e
7
+ data.tar.gz: 88b934a7b6e3e3f350581930b6aa6bd7e42dcd7205b72327e4fd8559df81be9306d0662ca2e55e19c79d0bbc8a36ccc98cb4ca48e10bc095a1a03f9f1e004cdc
@@ -23,12 +23,9 @@ class WcoEmail::EmailCampaignsController < WcoEmail::ApplicationController
23
23
  def do_send
24
24
  @campaign = EmailCampaign.find params[:id]
25
25
  authorize! :send, @campaign
26
- @campaign.do_send
27
- @campaign.update_attributes({
28
- status: 'inactive',
29
- sent_at: Time.now,
30
- })
31
- flash[:notice] = 'Probably ok.'
26
+ @campaign.update_attributes( status: 'scheduling' )
27
+ WcoEmail::EmailCampaignJob.perform_async( params[:id] )
28
+ flash[:notice] = 'Scheduled.'
32
29
  redirect_to request.referrer
33
30
  end
34
31
 
@@ -0,0 +1,16 @@
1
+
2
+ class WcoEmail::EmailCampaignJob
3
+ include Sidekiq::Job
4
+
5
+ sidekiq_options queue: 'wco_email_rb'
6
+
7
+ def perform id
8
+ @campaign = WcoEmail::Campaign.find id
9
+ @campaign.do_send
10
+ @campaign.update_attributes({
11
+ status: 'inactive',
12
+ sent_at: Time.now,
13
+ })
14
+ end
15
+
16
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_email
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1.110
4
+ version: 0.1.1.111
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev
@@ -331,6 +331,7 @@ files:
331
331
  - app/controllers/wco_email/sessions_controller.rb
332
332
  - app/controllers/wco_email/unsubscribes_controller.rb
333
333
  - app/helpers/wco_email/application_helper.rb
334
+ - app/jobs/wco_email/email_campaign_job.rb
334
335
  - app/jobs/wco_email/message_intake_job.rb
335
336
  - app/views/202212 Mailchimp Templates/202212 1col fixed-width.html
336
337
  - app/views/202212 Mailchimp Templates/202212 1col full-width.html