2018-04-24 18:30:50 +03:00
|
|
|
[package]
|
2018-06-14 19:18:14 +03:00
|
|
|
name = "fxa_email_service"
|
2018-08-09 21:55:55 +03:00
|
|
|
version = "1.118.0"
|
2018-06-27 18:07:48 +03:00
|
|
|
publish = false
|
2018-04-24 18:30:50 +03:00
|
|
|
|
2018-06-25 18:26:52 +03:00
|
|
|
[[bin]]
|
2018-07-03 20:13:43 +03:00
|
|
|
name = "fxa_email_send"
|
2018-06-25 18:26:52 +03:00
|
|
|
path = "src/bin/service.rs"
|
|
|
|
|
|
|
|
[[bin]]
|
2018-07-03 20:13:43 +03:00
|
|
|
name = "fxa_email_queues"
|
2018-06-25 18:26:52 +03:00
|
|
|
path = "src/bin/queues.rs"
|
|
|
|
|
2018-04-24 18:30:50 +03:00
|
|
|
[dependencies]
|
2018-06-21 21:30:11 +03:00
|
|
|
base64 = ">=0.6.0"
|
2018-06-05 23:50:02 +03:00
|
|
|
chrono = { version = ">=0.4.2", features = [ "serde" ] }
|
|
|
|
config = ">=0.8.0"
|
2018-06-21 21:30:11 +03:00
|
|
|
emailmessage = ">=0.1.0"
|
2018-08-08 01:39:24 +03:00
|
|
|
failure = ">=0.1.2"
|
2018-06-06 00:16:02 +03:00
|
|
|
futures = ">=0.1.21,<0.2"
|
2018-06-05 23:50:02 +03:00
|
|
|
hex = ">=0.3.2"
|
2018-06-19 10:28:02 +03:00
|
|
|
hmac = ">=0.6.2"
|
2018-06-05 23:50:02 +03:00
|
|
|
lazy_static = ">=1.0"
|
2018-07-11 09:07:50 +03:00
|
|
|
lettre = "0.8"
|
|
|
|
lettre_email = "0.8"
|
2018-06-05 23:50:02 +03:00
|
|
|
md5 = ">=0.3.7"
|
2018-06-11 09:02:10 +03:00
|
|
|
mozsvc-common = ">=0.1.0"
|
2018-06-20 21:11:20 +03:00
|
|
|
rand = ">=0.5.1"
|
2018-06-19 10:28:02 +03:00
|
|
|
redis = ">=0.8.0"
|
2018-06-05 23:50:02 +03:00
|
|
|
regex = ">=1.0"
|
|
|
|
reqwest = ">=0.8.5"
|
2018-07-12 19:46:14 +03:00
|
|
|
# Remove once a new version of rocket containing this commit is released.
|
2018-08-08 01:39:24 +03:00
|
|
|
rocket = { git = "https://github.com/SergioBenitez/Rocket", rev="d7f6d82fe4d35ee79c424dd4164733b22f17f80a" }
|
|
|
|
rocket_codegen = { git = "https://github.com/SergioBenitez/Rocket", rev="d7f6d82fe4d35ee79c424dd4164733b22f17f80a" }
|
|
|
|
rocket_contrib = { git = "https://github.com/SergioBenitez/Rocket", rev="d7f6d82fe4d35ee79c424dd4164733b22f17f80a" }
|
2018-08-09 21:21:32 +03:00
|
|
|
rusoto_core = { git = "https://github.com/brizental/rusoto", branch="request-body-params" }
|
|
|
|
rusoto_credential = { git = "https://github.com/brizental/rusoto", branch="request-body-params" }
|
|
|
|
rusoto_mock = { git = "https://github.com/brizental/rusoto", branch="request-body-params" }
|
|
|
|
rusoto_ses = { git = "https://github.com/brizental/rusoto", branch="request-body-params" }
|
|
|
|
rusoto_sqs = { git = "https://github.com/brizental/rusoto", branch="request-body-params" }
|
2018-06-21 21:30:11 +03:00
|
|
|
sendgrid = ">=0.7.1"
|
2018-06-05 23:50:02 +03:00
|
|
|
serde = ">=1.0"
|
|
|
|
serde_derive = ">=1.0"
|
|
|
|
serde_json = ">=1.0"
|
2018-06-18 19:09:35 +03:00
|
|
|
serde_test = ">=1.0.66"
|
2018-06-19 10:28:02 +03:00
|
|
|
sha2 = ">=0.7.1"
|
2018-06-11 09:02:10 +03:00
|
|
|
slog = ">=2.2.3"
|
|
|
|
slog-async = ">=2.3.0"
|
|
|
|
slog-mozlog-json = ">=0.1.0"
|
chore(queues): use mozlog and failure in queues process (#161) r=@vladikoff,@philbooth
Fixes #10
Fixes #99
Connects to #116
This was my first experience messing with the queues part of the service, I thought dealing with these issues first would make the experience smoother. I added the standard logging and error handling with the failure crate just like the rest of the lib.
Since our errors were very much centered around requests and rocket, we have some fields that don't really make sense for the queues process, like the http code, so let me know what you think about that and if the queues process should have a different error format. I also did another minor change to the errors: now the response JSON will return a number for code and errno, instead of a string.
For logging, I implemented an AppErrorFields so that we get better structured logs for our AppErrors. I used slog_scope to make it easier to have a global logger for the queues process, let me know what you think about that... In the README.md for that crate, they have some warnings about it not being the best idea all the time, but anyways, I thought it was neat and worked well for our case.
Finally, when I started working in the queues they were not really working due to parsing errors, you will see that I changed a little bit the SQS Notification struct, that was for parsing to work, also I created a notification-dev queue in the AWS Console, because it didn't exist yet, I think everything is working fine now.
2018-08-09 03:24:14 +03:00
|
|
|
slog-scope = ">=4.0.1"
|
2018-06-11 09:02:10 +03:00
|
|
|
slog-term = ">=2.4.0"
|
2018-07-27 21:27:02 +03:00
|
|
|
socketlabs = ">=0.1.3"
|