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:
Aleksei Voronov 2024-10-18 19:59:32 +02:00
parent 7eba3654f8
commit 8ddca6303d
3 changed files with 3 additions and 2 deletions

View File

@ -0,0 +1 @@
ALTER TABLE SubscriptionState ALTER COLUMN cursor TYPE BIGINT;

View File

@ -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!(

View File

@ -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(