Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lat/Long default and improved telemetry #111

Merged
merged 2 commits into from
Oct 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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