Bluesky blew through max int number of messages
Well, end of an era I guess. Time to use a bigger (bigint) cursor. Interestingly enough, some of Rust parts were already using an i64, but others weren't. Huh.
This commit is contained in:
parent
7eba3654f8
commit
8ddca6303d
|
@ -0,0 +1 @@
|
|||
ALTER TABLE SubscriptionState ALTER COLUMN cursor TYPE BIGINT;
|
|
@ -145,7 +145,7 @@ impl Bluesky {
|
|||
pub async fn subscribe_to_operations<P: CommitProcessor>(
|
||||
&self,
|
||||
processor: &P,
|
||||
cursor: Option<i32>,
|
||||
cursor: Option<i64>,
|
||||
) -> Result<()> {
|
||||
let url = match cursor {
|
||||
Some(cursor) => format!(
|
||||
|
|
|
@ -213,7 +213,7 @@ impl Database {
|
|||
.await?)
|
||||
}
|
||||
|
||||
pub async fn fetch_subscription_cursor(&self, host: &str, did: &str) -> Result<Option<i32>> {
|
||||
pub async fn fetch_subscription_cursor(&self, host: &str, did: &str) -> Result<Option<i64>> {
|
||||
let mut params = Parameters::new();
|
||||
|
||||
Ok(query(
|
||||
|
|
Loading…
Reference in New Issue