contentful-scheduler-custom-build-john 1.15 → 1.16
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 +6 -0
- 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: 968f8e5c217691f8fe27ba44dc428517e5c6ac89
|
4
|
+
data.tar.gz: dc88930911a1395da8e265aab26e2f7be8824087
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2393c5e2881b8f00e5967a47a23ac25472390fbc15f867081a7974bc9b33a27d0d3adc8794f26889a17046a47462c4eaf0b1f3eaeeeed0311c9ea2272ca46b6a
|
7
|
+
data.tar.gz: a9da515f18f52379ca90007b12c96089063d072d86fbde44d893929c33711d109579a3f9b37083e8a059c0c203198eba5cc477ac761d2d079d863ddf7492e16f
|
@@ -17,6 +17,7 @@ module Contentful
|
|
17
17
|
return unless publishable?(webhook)
|
18
18
|
remove(webhook) if in_queue?(webhook)
|
19
19
|
puts already_published?(webhook)
|
20
|
+
puts "already_published"
|
20
21
|
return if already_published?(webhook)
|
21
22
|
|
22
23
|
success = Resque.enqueue_at(
|
@@ -64,14 +65,19 @@ module Contentful
|
|
64
65
|
|
65
66
|
def already_published?(webhook)
|
66
67
|
return true if publish_date(webhook) < Time.now.utc
|
68
|
+
puts !webhook.fields[spaces[webhook.space_id][:is_publish_in_future]]
|
67
69
|
if !webhook.fields[spaces[webhook.space_id][:is_publish_in_future]]
|
70
|
+
puts "Inside this 1st"
|
68
71
|
return false unless webhook.sys.key?('publishedAt')
|
69
72
|
if !webhook.sys['publishedAt'].nil?
|
73
|
+
puts "Inside this 2nd"
|
70
74
|
return Chronic.parse(webhook.sys['publishedAt']).utc < Time.now.utc
|
71
75
|
end
|
72
76
|
else
|
77
|
+
puts "Inside this else2nd"
|
73
78
|
return false
|
74
79
|
end
|
80
|
+
puts "Inside this else main"
|
75
81
|
|
76
82
|
false
|
77
83
|
end
|