Diff
Logged in as anonymous

Differences From Artifact [73ac2fd559]:

To Artifact [c6e371c2f9]:


176
177
178
179
180
181
182

183
184
185
186
187
188
189
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190







+







					id.clone()
				},
			}
		};
		let count = Arc::strong_count(&id);
		if count == 2 {
			let source = conn.get_source(*id, owner).await?;
			conn.set_scrape(*id).await?;
			let destination = match real {
				true => source.channel_id,
				false => source.owner,
			};
			let mut this_fetch: Option<DateTime<chrono::FixedOffset>> = None;
			let mut posts: BTreeMap<DateTime<chrono::FixedOffset>, String> = BTreeMap::new();

239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
240
241
242
243
244
245
246

247
248
249
250
251
252
253







-







						conn.add_post(*id, date, &post_url).await?;
					};
				};
				posted += 1;
			};
			posts.clear();
		};
		conn.set_scrape(*id).await?;
		Ok(format!("Posted: {posted}"))
	}

	async fn autofetch(&mut self) -> Result<std::time::Duration> {
		let mut delay = chrono::Duration::minutes(1);
		let now = chrono::Local::now();
		let mut conn = self.db.begin().await?;