contentful-scheduler-custom 1.5.6996 → 1.5.6997
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/contentful/scheduler/queue.rb +10 -2
- data/lib/contentful/scheduler/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e48034e1f6d559682ad2008a519184251397ad27
|
4
|
+
data.tar.gz: 551e3d60ce080c101d5b0ce6adeb4e159ec14384
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58ec672d05c651541560b81060d969eed70f8399098a83a82f7b0113a034af7eafd32efa82ebd1849e2a6f082b2c510bc667781e0a2a20429d0f3ebefd10ca1b
|
7
|
+
data.tar.gz: 8b3623a594289e6c1361191870af8d01a1369f8371615b3fa30a24984e4e383accf5b61c44340a5eaa7992747864e2257947bd55d0dfb291e33beeaacfb0db1d
|
@@ -78,7 +78,7 @@ module Contentful
|
|
78
78
|
return unless unpublishable?(webhook)
|
79
79
|
return unless in_unpublish_queue?(webhook)
|
80
80
|
|
81
|
-
|
81
|
+
removeContentBlocks(webhook, 'unpublish')
|
82
82
|
|
83
83
|
success = Resque.remove_delayed(
|
84
84
|
::Contentful::Scheduler::Tasks::Unpublish,
|
@@ -154,7 +154,7 @@ module Contentful
|
|
154
154
|
if isContentBlockAvailable(webhook)
|
155
155
|
webhook.fields['contentBlocks']['fi-FI'].each do |sys|
|
156
156
|
success = Resque.enqueue_at(
|
157
|
-
|
157
|
+
getPublishOrUnpublishDate(webhook, type),
|
158
158
|
getScheduleType(type),
|
159
159
|
webhook.space_id,
|
160
160
|
sys['sys']['id'],
|
@@ -220,6 +220,14 @@ module Contentful
|
|
220
220
|
end
|
221
221
|
end
|
222
222
|
|
223
|
+
def getPublishOrUnpublishDate(webhook, type)
|
224
|
+
if type == 'publish'
|
225
|
+
publish_date(webhook)
|
226
|
+
else
|
227
|
+
unpublish_date(webhook)
|
228
|
+
end
|
229
|
+
end
|
230
|
+
|
223
231
|
def spaces
|
224
232
|
config[:spaces]
|
225
233
|
end
|