Skip to content

Commit

Permalink
chore(notifications): add sqlxmq boilerplate
Browse files Browse the repository at this point in the history
  • Loading branch information
bodymindarts committed Feb 11, 2024
1 parent 2280047 commit 7266705
Show file tree
Hide file tree
Showing 24 changed files with 1,069 additions and 9 deletions.
57 changes: 57 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ members = [
"core/notifications",
"lib/tracing-rs",
"lib/es-entity-rs",
"lib/job-executor-rs",
]

[workspace.dependencies]
Expand Down Expand Up @@ -45,4 +46,5 @@ tonic-health = "0.10.2"
prost = "0.12"
rust-i18n = "3"
google-fcm1 = "5.0.3"
sqlxmq = { version = "0.5", default-features = false, features = ["runtime-tokio-rustls"] }

2 changes: 1 addition & 1 deletion core/api-keys/src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ async fn check_handler(
State((header, app)): State<(String, ApiKeysApp)>,
headers: HeaderMap,
) -> Result<Json<CheckResponse>, ApplicationError> {
tracing::extract_tracing(&headers);
tracing::http::extract_tracing(&headers);
let key = headers.get(header).ok_or(ApplicationError::MissingApiKey)?;
let (id, sub, read_only) = app.lookup_authenticated_subject(key.to_str()?).await?;
let scope = if read_only {
Expand Down
3 changes: 3 additions & 0 deletions core/notifications/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ galoy_rust_bin(
deps = [
"//lib/tracing-rs:tracing",
"//lib/es-entity-rs:es-entity",
"//lib/job-executor-rs:job-executor",
"//third-party/rust:tokio",
"//third-party/rust:anyhow",
"//third-party/rust:async-graphql",
Expand All @@ -59,6 +60,7 @@ galoy_rust_bin(
"//third-party/rust:chrono",
"//third-party/rust:futures",
"//third-party/rust:sqlx",
"//third-party/rust:sqlxmq",
"//third-party/rust:mongodb",
"//third-party/rust:rand",
"//third-party/rust:uuid",
Expand All @@ -72,6 +74,7 @@ galoy_rust_bin(
extra_tests = [
"//lib/tracing-rs:tracing",
"//lib/es-entity-rs:es-entity",
"//lib/job-executor-rs:job-executor",
],
protos = ["proto/notifications.proto"],
env = {
Expand Down
12 changes: 12 additions & 0 deletions core/notifications/migrations/20210316025847_setup.down.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
DROP FUNCTION mq_checkpoint;
DROP FUNCTION mq_keep_alive;
DROP FUNCTION mq_delete;
DROP FUNCTION mq_commit;
DROP FUNCTION mq_insert;
DROP FUNCTION mq_poll;
DROP FUNCTION mq_active_channels;
DROP FUNCTION mq_latest_message;
DROP TABLE mq_payloads;
DROP TABLE mq_msgs;
DROP FUNCTION mq_uuid_exists;
DROP TYPE mq_new_t;
Loading

0 comments on commit 7266705

Please sign in to comment.