caboose-rets 0.1.40 → 0.1.41
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/caboose_rets/rets_importer.rb +13 -9
- data/lib/caboose_rets/version.rb +1 -1
- data/lib/tasks/caboose_rets.rake +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: 797cfd1b91e89149b9fdb0230e37a0f1161874a7
|
4
|
+
data.tar.gz: a78bce9795e10d4211b958b2fc590175dee3749f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ae933b766f267a4d30e62349d74e8b793845dd5d8ee17eabd26e2b5a2fafe1b8bf7b63b3cdbc7ff2bac6d8799e7206c92c5cd0029090e45aa387a95f0cd4d61
|
7
|
+
data.tar.gz: bb70b439366533694fcc71344ac4b113358e2aea2b7b92f6f4ed8d6e952526cdba6456e269c46e5f5d7b864b35c7fd6a7cdca428de7ff5aa41f1a77878e0fe59
|
@@ -127,29 +127,33 @@ class CabooseRets::RetsImporter # < ActiveRecord::Base
|
|
127
127
|
|
128
128
|
def self.update_helper(class_type, date_modified, save_images = true)
|
129
129
|
self.log "In update helper for #{class_type}"
|
130
|
+
self.log "Updating everything modified after #{date_modified}"
|
130
131
|
m = self.meta(class_type)
|
131
132
|
k = m.remote_key_field
|
132
133
|
d = date_modified.in_time_zone(CabooseRets::timezone).strftime("%FT%T")
|
133
134
|
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
135
|
+
self.log "d: #{d}"
|
136
|
+
|
137
|
+
# statusquery = ""
|
138
|
+
# case class_type
|
139
|
+
# when 'Property' then statusquery = "MlsStatus=Active"
|
140
|
+
# when 'Office' then statusquery = "OfficeStatus=Active"
|
141
|
+
# when 'Member' then statusquery = "MemberStatus=Active"
|
142
|
+
# when 'OpenHouse' then statusquery = "OpenHouseKeyNumeric=0+"
|
143
|
+
# end
|
141
144
|
|
142
145
|
params = {
|
143
146
|
:search_type => m.search_type,
|
144
147
|
:class => class_type,
|
145
148
|
:select => [m.remote_key_field],
|
146
149
|
:querytype => 'DMQL2',
|
147
|
-
:query => "(#{m.date_modified_field}=#{d}+)AND(#{statusquery})",
|
150
|
+
:query => "(#{m.date_modified_field}=#{d}+)", #AND(#{statusquery})",
|
148
151
|
:standard_names_only => true,
|
149
152
|
:timeout => -1
|
150
153
|
}
|
151
154
|
self.log(params)
|
152
|
-
self.client.search(params) do |data|
|
155
|
+
self.client.search(params) do |data|
|
156
|
+
self.log data
|
153
157
|
case class_type
|
154
158
|
when 'Property' then self.delay(:priority => 10, :queue => 'rets').import_properties(data[k], save_images)
|
155
159
|
when 'Office' then self.delay(:priority => 10, :queue => 'rets').import_office( data[k], save_images)
|
data/lib/caboose_rets/version.rb
CHANGED
data/lib/tasks/caboose_rets.rake
CHANGED
@@ -101,7 +101,7 @@ namespace :caboose_rets do
|
|
101
101
|
|
102
102
|
desc "update helper"
|
103
103
|
task :uh => :environment do
|
104
|
-
CabooseRets::RetsImporter.update_helper('Property', last_updated)
|
104
|
+
CabooseRets::RetsImporter.update_helper('Property', last_updated, false)
|
105
105
|
end
|
106
106
|
|
107
107
|
#desc "Delete old rets properties"
|