contentful-scheduler-custom 1.5.694 → 1.5.695
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 +4 -4
- data/lib/contentful/scheduler/queue.rb +19 -1
- data/lib/contentful/scheduler/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb7fdd599e8dd540a40bf40675b02f2d08e38d77
|
4
|
+
data.tar.gz: 468038f5f236c7ead17a776c5321ad065013ec19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b471b9a021dd0ee57a4d2c84cac351416afb87f6ae379eb88d1bea5b39667da6f76f3715232a5661ee6efcc96c2df5efa1663c69f9820c5767e3e6e97c95f2d
|
7
|
+
data.tar.gz: 7441775c374d2bff417361b65d6eeb3bd7ef29ca4f9bc77c2eada2f39639deb27083a894d963d2936edd32ee9d80453c86df1ea826b104062fc56bd6d66b37c4
|
@@ -85,7 +85,7 @@ module Contentful
|
|
85
85
|
::Contentful::Scheduler.config[:management_token]
|
86
86
|
)
|
87
87
|
|
88
|
-
|
88
|
+
removeContentBlocksUnpublish(webhook)
|
89
89
|
|
90
90
|
log_event_success(webhook, success, 'unpublish', 'removed from')
|
91
91
|
end
|
@@ -187,6 +187,24 @@ module Contentful
|
|
187
187
|
end
|
188
188
|
end
|
189
189
|
|
190
|
+
def removeContentBlocksUnpublish(webhook)
|
191
|
+
if isContentBlockAvailable(webhook)
|
192
|
+
webhook.fields['contentBlocks']['fi-FI'].each do |sys|
|
193
|
+
success = Resque.remove_delayed(
|
194
|
+
::Contentful::Scheduler::Tasks::Unpublish,
|
195
|
+
webhook.space_id,
|
196
|
+
sys['sys']['id'],
|
197
|
+
::Contentful::Scheduler.config[:management_token]
|
198
|
+
)
|
199
|
+
if success
|
200
|
+
logger.info "Webhook Content Block {id: #{sys['sys']['id']}, space_id: #{webhook.space_id}} successfully removed from unpublish queue"
|
201
|
+
else
|
202
|
+
logger.warn "Webhook Content Block {id: #{sys['sys']['id']}, space_id: #{webhook.space_id}} couldn't be removed from unpublish queue"
|
203
|
+
end
|
204
|
+
end
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
190
208
|
def isContentBlockAvailable(webhook)
|
191
209
|
return !webhook.fields['contentBlocks'].nil?
|
192
210
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: contentful-scheduler-custom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.695
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Contentful GmbH (David Litvak Bruno0
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: contentful-webhook-listener
|