prune_cloudfiles_db_backups 0.0.2 → 0.0.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7877ef33b6452ae1e8f08bc50c66c47a844f8ae5
|
4
|
+
data.tar.gz: 158a7ab489a862273d2f4b1bf83d996cf3082238
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a80268508113b2009eb9522166cd5e371a6d02c8acd10abb55af2bd21d02069ad0b713fd68dd2af9aa3ac722cec8558247bc380dd83a93b264d80fef518752f
|
7
|
+
data.tar.gz: 6ccf31a9bc1d78ec47781aa715a7a7d0efb9466d855b636eab927db331d0e876de6aa02b064082e2a49178fa3f333262a8740bb5944803c0228688792fb5adf5
|
@@ -16,8 +16,7 @@ module PruneCloudfilesDbBackups
|
|
16
16
|
@objects = @container.objects
|
17
17
|
count = @container.count.to_i
|
18
18
|
while @objects.size < count do
|
19
|
-
|
20
|
-
@objects.concat(@container.objects(marker: last))
|
19
|
+
@objects.concat(@container.objects(marker: @objects.last))
|
21
20
|
end
|
22
21
|
|
23
22
|
calc = RetentionCalculator.new(@objects,
|
@@ -12,6 +12,9 @@ module PruneCloudfilesDbBackups
|
|
12
12
|
|
13
13
|
@object_pile = IO.read("#{File.dirname(__FILE__)}/lists/backup_pile.txt").split("\n")
|
14
14
|
container = double('an openstack container')
|
15
|
+
container.stub(:count) {
|
16
|
+
@object_pile.length
|
17
|
+
}
|
15
18
|
container.stub(:objects) {
|
16
19
|
@object_pile
|
17
20
|
}
|