feedx 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/feedx.gemspec +1 -1
- data/producer.go +1 -5
- data/producer_test.go +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ad83b2f9b53fb7574dc5bb90b39e9157a0f6f3bdbcc08065935cf9ffd97bb4f
|
4
|
+
data.tar.gz: d8e41fb163afd5d9b301b064a2f437ba8ebfb8850bcb3fd1e3497045c9c46a2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54a9d0f4269c11533576abedd48fc8180fc0de67d0e5d8008f5d82074a200ea2ba0644039ffd8dda6f4495956224e62f20410243da303911ed11dfa563dec10a
|
7
|
+
data.tar.gz: 9f9a46443a06d5f1d5ef95144414b90a5163db8086fc56b6a81d934fc1dc0f9df8ed33289cc4fbadb8ec06c4f065401106d35ed414c2a055395f6ca02cff52f2
|
data/Gemfile.lock
CHANGED
data/feedx.gemspec
CHANGED
data/producer.go
CHANGED
@@ -117,11 +117,8 @@ func (p *Producer) Close() error {
|
|
117
117
|
}
|
118
118
|
|
119
119
|
func (p *Producer) push() error {
|
120
|
-
|
120
|
+
now := timestampFromTime(time.Now()).Millis()
|
121
121
|
defer func() {
|
122
|
-
if now == 0 {
|
123
|
-
now = timestampFromTime(time.Now()).Millis()
|
124
|
-
}
|
125
122
|
atomic.StoreInt64(&p.lastPush, now)
|
126
123
|
}()
|
127
124
|
|
@@ -143,7 +140,6 @@ func (p *Producer) push() error {
|
|
143
140
|
return err
|
144
141
|
}
|
145
142
|
|
146
|
-
now = timestampFromTime(time.Now()).Millis()
|
147
143
|
atomic.StoreInt64(&p.numWritten, int64(writer.NumWritten()))
|
148
144
|
atomic.StoreInt64(&p.lastMod, now)
|
149
145
|
return nil
|
data/producer_test.go
CHANGED
@@ -38,6 +38,7 @@ var _ = Describe("Producer", func() {
|
|
38
38
|
It("should produce", func() {
|
39
39
|
Expect(subject.LastPush()).To(BeTemporally("~", time.Now(), time.Second))
|
40
40
|
Expect(subject.LastModified()).To(Equal(subject.LastPush()))
|
41
|
+
Expect(subject.NumWritten()).To(Equal(10))
|
41
42
|
Expect(subject.Close()).To(Succeed())
|
42
43
|
})
|
43
44
|
})
|