add: increase note character limit (16384 (*16)-> 262144)
This commit is contained in:
parent
c1568ad866
commit
57a69eea50
2 changed files with 3 additions and 3 deletions
|
@ -78,7 +78,7 @@ impl DataManager {
|
|||
|
||||
if data.content.len() < 2 {
|
||||
return Err(Error::DataTooShort("content".to_string()));
|
||||
} else if data.content.len() > 16384 {
|
||||
} else if data.content.len() > 262144 {
|
||||
return Err(Error::DataTooLong("content".to_string()));
|
||||
}
|
||||
|
||||
|
|
|
@ -713,10 +713,10 @@ impl DataManager {
|
|||
/// To be considered a "great post", a post must have a score ((likes - dislikes) / (likes + dislikes))
|
||||
/// of at least 0.6.
|
||||
///
|
||||
/// GPA is calculated based on the user's last 250 posts.
|
||||
/// GPA is calculated based on the user's last 48 posts.
|
||||
pub async fn calculate_user_gpa(&self, id: usize) -> f32 {
|
||||
// just for note, this is SUPER bad for performance... which is why we
|
||||
// only calculate this when it expires in the cache (every week)
|
||||
// only calculate this when it expires in the cache (every day)
|
||||
if let Some(cached) = self.0.1.get(format!("atto.user.gpa:{}", id)).await {
|
||||
if let Ok(c) = cached.parse() {
|
||||
return c;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue