caboose-cms 0.9.96 → 0.9.97

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
  SHA1:
3
- metadata.gz: 5ad6269e8a9403d6c83fbee89f8a009f5d2b88de
4
- data.tar.gz: 7c05f793ff82f90e2a60a2137e119c812fba3e33
3
+ metadata.gz: b313b528aff85bf26feb9bb66e90738cd9c31a22
4
+ data.tar.gz: 84d6f32889e9ac803b6a63f9985dc3ea4ad8956c
5
5
  SHA512:
6
- metadata.gz: 3aa14db6159e76f2112daee0f165b2c5430f9d18ca2065999a0f1de9e862739dc5aa85c3c161916ac4408033e13bae7dd8379ce135c0ce272ed6c5d830817347
7
- data.tar.gz: de7420a330a17cd0cc1d4acbedf6b91d4ce10785b39dc273052482f4150f29cd0c317ded447e0f8cbc524158d6fc46e746705f19ed6b2366a82a98602d5d865f
6
+ metadata.gz: f9b18df80b08810a8503b674fb0bab6513ccb6397fad41b1db36cfd05dbaa68babd48950ccd9676daf46cca620890162dda40c9a8ac1b49f39053febd1704e1c
7
+ data.tar.gz: e0145fa9e2cb9d4f1efbd9374822949d2b35103bf7f902de4e1697f51ce34b5a8975666e0e485ed9131d669417d85c86f405cb1f3787ed92bf341aac29082ebe
@@ -19,11 +19,11 @@ module Caboose
19
19
  # if records['eventSource'] == "aws:s3"
20
20
  # msg = JSON.parse(body[:Message])
21
21
  # if msg['Records']
22
- if body && body['Records']
23
- body['Records'].each do |r|
24
- if r['eventName'] && r['eventName'].starts_with?('ObjectCreated')
25
- if r['s3'] && r['s3']['object'] && r['s3']['object']['key']
26
- key = URI.decode(r['s3']['object']['key']).gsub('+', ' ')
22
+ if body && body[:Records]
23
+ body[:Records].each do |r|
24
+ if r[:eventName] && r[:eventName].starts_with?('ObjectCreated')
25
+ if r[:s3] && r[:s3][:object] && r[:s3][:object][:key]
26
+ key = URI.decode(r[:s3][:object][:key]).gsub('+', ' ')
27
27
  Caboose.log("Processing #{key}")
28
28
  arr = key.split('_')
29
29
  media_category_id = arr.shift
@@ -31,7 +31,7 @@ module Caboose
31
31
  name = Caboose::Media.upload_name(original_name)
32
32
  m = Media.where(:media_category_id => media_category_id, :original_name => original_name, :name => name).first
33
33
  m = Media.create(:media_category_id => media_category_id, :original_name => original_name, :name => name, :processed => false) if m.nil?
34
- m.delay(:queue => 'caboose_media').process
34
+ m.delay(:queue => 'caboose_media', :priority => 3).process
35
35
  end
36
36
  end
37
37
  end
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.9.96'
2
+ VERSION = '0.9.97'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.96
4
+ version: 0.9.97
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-06 00:00:00.000000000 Z
11
+ date: 2017-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg