Skip to content

Commit

Permalink
Merge pull request #111 from protect-earth/al/110
Browse files Browse the repository at this point in the history
Lat/Long default and improved telemetry
  • Loading branch information
allanlang authored Oct 15, 2023
2 parents 4fe5c83 + 4bf107e commit 5c19c2a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Tree Tracker/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>0.11.0</string>
<string>0.11.1</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>ITSAppUsesNonExemptEncryption</key>
Expand Down
15 changes: 13 additions & 2 deletions Tree Tracker/Services/ProtectEarth/ProtectEarthTreeService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ class ProtectEarthTreeService: TreeService {
// guard let plantedDate = tree.createDate else { return }
guard let coordinates: [String] = tree.coordinates?.components(separatedBy: ", ") else { return }

var latitude = ""
var longitude = ""
var latitude = "0"
var longitude = "0"

if (coordinates.count == 2) {
latitude = coordinates[0]
Expand Down Expand Up @@ -109,6 +109,17 @@ class ProtectEarthTreeService: TreeService {
)
.continueWith { (task) -> AnyObject? in
// stuff we want to do once the task is *STARTED*
Rollbar.infoMessage("S3 upload started", data: [
"bucket-path": "\(Secrets.awsBucketPrefix)/\(tree.treeId)",
"x-amz-meta-planted-at": tree.createDate?.ISO8601Format(),
"x-amz-meta-supervisor": tree.supervisor,
"x-amz-meta-latitude": latitude,
"x-amz-meta-longitude": longitude,
"x-amz-meta-site": tree.site,
"x-amz-meta-species": tree.species,
"x-amz-meta-phimageid": tree.phImageId,
"x-amz-meta-md5": md5
])
return nil
}
}
Expand Down
2 changes: 1 addition & 1 deletion Unit Tests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>0.11.0</string>
<string>0.11.1</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
Expand Down

0 comments on commit 5c19c2a

Please sign in to comment.