breaking changes: ./data
This commit is contained in:
parent
66bd084070
commit
27e4deb543
2 changed files with 3 additions and 4 deletions
|
|
@ -5,6 +5,5 @@ services:
|
|||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
- ./processed_items.db:/usr/app/processed_items.db
|
||||
# - ./processed.json:/app/processed.json # if you need to migration
|
||||
- ./data:/usr/app/data
|
||||
- ./rss.toml:/usr/app/rss.toml
|
||||
|
|
|
|||
|
|
@ -28,10 +28,10 @@ async fn main() -> Result<()> {
|
|||
let config: FullConfig = toml::from_str(&rss_toml_content)?;
|
||||
let config = Arc::new(config);
|
||||
|
||||
let storage = Arc::new(Storage::new("processed_items.db")?);
|
||||
let storage = Arc::new(Storage::new("./data/processed_items.db")?);
|
||||
|
||||
// Migration from old processed.json if it exists
|
||||
let old_processed_path = "../memos-rss/processed.json";
|
||||
let old_processed_path = "./data/processed.json";
|
||||
if std::path::Path::new(old_processed_path).exists() {
|
||||
println!("Found old processed.json, migrating data...");
|
||||
let content = std::fs::read_to_string(old_processed_path)?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue