reso 0.1.2.0 → 0.1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40d73be58419384a1c36b0cf68410db55bc95abb
|
4
|
+
data.tar.gz: d73d8c8395ce5c5829ad20d9f2f5b416a584107c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c98555ad280f777976132930c82db9bc6d7bbfcc8f917443c524d9130c8fd9961c44623c15c15c0a2abb6562935b59a4b6550bdd8330531d1370fe813b4be49
|
7
|
+
data.tar.gz: 3cfe39b4c852971963c92e76d9d34678e52a21a8022b93b7c3ee97f58bd53c50f4999819886ab33d17bbc85c7214aa084f00be0897d02998dd101811f3f2746f
|
data/app/models/import.rb
CHANGED
@@ -93,10 +93,11 @@ namespace :reso do
|
|
93
93
|
task :import, [:import_token] => [:environment] do |t, args|
|
94
94
|
|
95
95
|
args.with_defaults(:import_token => "reso")
|
96
|
-
import = Import.
|
96
|
+
import = Import.where(status: 'active', token: args.import_token).first
|
97
97
|
|
98
98
|
unless import.blank?
|
99
99
|
unless import.new_source_data_exists?
|
100
|
+
import.update_attribute(:status, :running)
|
100
101
|
source_data_modified = import.source_url_last_modified
|
101
102
|
l, count, found_listing_keys, stream = 0, 0, [], ''
|
102
103
|
open_tag, close_tag = get_open_and_closing_tag_for import.repeating_element
|
@@ -131,6 +132,7 @@ namespace :reso do
|
|
131
132
|
removed_listing_keys: removed_listing_keys.inspect
|
132
133
|
})
|
133
134
|
import_result.save
|
135
|
+
import.update_attribute(:status, :active)
|
134
136
|
import.update_attribute(:source_data_modified, source_data_modified)
|
135
137
|
File.delete(filepath)
|
136
138
|
end
|
data/lib/reso/version.rb
CHANGED