feat(tori)!: add support for beta.tori.fi#40
Open
lajp wants to merge 8 commits intoTestausserveri:mainfrom
Open
feat(tori)!: add support for beta.tori.fi#40lajp wants to merge 8 commits intoTestausserveri:mainfrom
lajp wants to merge 8 commits intoTestausserveri:mainfrom
Conversation
After the new Tori.fi update, there is no way to uniquely identify the seller of an ad. I've decided to get rid of the seller blacklist feature all together, despite it still being possible for Huuto.net ads. This is an unfortunate design choice on Tori.fi's part and in my personal opinion the complete opposite of what should've been done.
luciusmagn
reviewed
Jun 11, 2024
| extern crate diesel; | ||
|
|
||
| use std::sync::{Arc, LazyLock, RwLock}; | ||
| use std::sync::{Arc, LazyLock}; |
Member
There was a problem hiding this comment.
Use parking_lot, it will make everything nicer since they can never panic
Member
There was a problem hiding this comment.
they are also faster and smaller in memory (but require that the platform you are deploying to can park threads)
| #[derive(Deserialize, Debug, Clone)] | ||
| pub struct ToriItem { | ||
| /// Type of the item for Torimies always "bap" | ||
| //pub r#type: String, |
Member
There was a problem hiding this comment.
Prolly get rid of this, if its unused.
If it is, it is much better to use #[serde(rename = "type")] and name the field something less keywordy
| None | ||
| } | ||
| let ret = api_parse_after(&res, self.last_updated) | ||
| .unwrap() |
| } | ||
| #[cfg(feature = "tori")] | ||
| { | ||
| if site_id == crate::tori::ID { |
Member
There was a problem hiding this comment.
| .get(&k) | ||
| .expect("bug: impossible") | ||
| .lock() | ||
| .unwrap() |
Member
There was a problem hiding this comment.
yeah, you could avoid this with parking lot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This will bump the version to 0.3.0.
We are dropping support for:
Some things I'd still like to address in this PR: