Skip to content

Commit

Permalink
comment sending event to warehouse (#178)
Browse files Browse the repository at this point in the history
* comment sendign event to warehouse

* clippy fix

* limit to 50
  • Loading branch information
komal-sai-yral authored Apr 5, 2024
1 parent 5ec6bfd commit 0a1f624
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/page/post_view/video_iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl Default for FetchCursor {
impl FetchCursor {
pub fn advance(&mut self) {
self.start += self.limit;
self.limit = 20;
self.limit = 50;
}
}

Expand Down
32 changes: 16 additions & 16 deletions src/utils/event_streaming.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,22 +67,22 @@ pub fn send_user_id(user_id: String) {
);
}

pub fn send_event_warehouse(event_name: &str, params: &serde_json::Value) {
let data = serde_json::json!({
"kind": "bigquery#tableDataInsertAllRequest",
"rows": [
{
"json": {
"event": event_name.to_string(),
"params": params.to_string()
}
}
]
});

spawn_local(async move {
stream_to_bigquery(data).await.unwrap();
});
pub fn send_event_warehouse(_event_name: &str, _params: &serde_json::Value) {
// let data = serde_json::json!({
// "kind": "bigquery#tableDataInsertAllRequest",
// "rows": [
// {
// "json": {
// "event": event_name.to_string(),
// "params": params.to_string()
// }
// }
// ]
// });

// spawn_local(async move {
// stream_to_bigquery(data).await.unwrap();
// });
}

#[cfg(feature = "ssr")]
Expand Down

0 comments on commit 0a1f624

Please sign in to comment.