txcatcher 0.1.6 → 0.1.7

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: 57275484854984cda01f4f29c6660d19db19ff71
4
- data.tar.gz: 6bb6d1e3de974824ffcfd8e918545b112b4bd0d5
3
+ metadata.gz: 9c43d229ba733c395f0dbf5cac76eade727cb2a9
4
+ data.tar.gz: fa0dd26fc337d4d6c94ed4c595655afa6fd2203a
5
5
  SHA512:
6
- metadata.gz: e81da207158daf3c4b8cf61636deecd85088c2edb7bd191b52007f47639fe00cbc89c923019fc92566a69ac675a56d792e90247338c33b5a787208ddf46b9b2c
7
- data.tar.gz: dbf857e7c92d76e34e4adfbe3c792115084159d6c2be8b90af2bec9d69b0b417ac1ccc520a208185e36f3de69c8ddfcc91f7e44965c5636ced454742487b28b9
6
+ metadata.gz: 90682b9fba3a7f11d2a99cbdae37466382297012578ca83cec11d49e5fd706d03088afc29385835905a9d6840b3b54fa4777bddd4fc93a25b6d4b0a011d83a98
7
+ data.tar.gz: 3d457be8d079ff1984bcb3fd300a5ba9b9e07d84fb1c28decc6097038982b1355be3fb92b836a3bd1b3f57403ddebfe46b8511168a09f01d37f0d0d800fc4b9b
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.6
1
+ 0.1.7
@@ -49,8 +49,9 @@ module TxCatcher
49
49
  transactions = Transaction.order("created_at ASC")
50
50
  transactions.where(Sequel.~(protected: true)) if Config.protected_transactions
51
51
  transactions.limit(n).each do |t|
52
+ $stdout.puts "- Removing tx #{t.txid}"
52
53
  clean_deposits(t)
53
- t.delete
54
+ TxCatcher.db_connection[:transactions].filter(id: t.id).delete
54
55
  @@cleaning_counter[:transactions] += 1
55
56
  end
56
57
  end
@@ -58,10 +59,10 @@ module TxCatcher
58
59
  def clean_deposits(transaction)
59
60
  transaction.deposits.each do |d|
60
61
  if d.address && d.address.deposits.count == 1
61
- d.address.delete
62
+ TxCatcher.db_connection[:addresses].filter(id: d.address.id).delete
62
63
  @@cleaning_counter[:addresses] += 1
63
64
  end
64
- d.delete
65
+ TxCatcher.db_connection[:deposits].filter(id: d.id).delete
65
66
  @@cleaning_counter[:deposits] += 1
66
67
  end
67
68
  end
data/txcatcher.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: txcatcher 0.1.6 ruby lib
5
+ # stub: txcatcher 0.1.7 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "txcatcher"
9
- s.version = "0.1.6"
9
+ s.version = "0.1.7"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: txcatcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Snitko