Overview
| Comment: | minor fixes: regexp, ordering |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
21d16a09932953fe01700744e10dc617 |
| User & Date: | arcade on 2020-11-18 15:11:26.788 |
| Other Links: | manifest | tags |
Context
|
2020-11-18
| ||
| 17:55 | 0.1.3 - different list, enable, disable, fix throttle check-in: 075be7e40e user: arcade tags: trunk | |
| 15:11 | minor fixes: regexp, ordering check-in: 21d16a0993 user: arcade tags: trunk | |
| 14:12 | huge cleanup, clone, thread spawn, new feed process, public /check check-in: 0191d490fe user: arcade tags: trunk | |
Changes
Modified Cargo.toml
from [6d443e5c4c]
to [1eac192b0a].
1 2 | [package] name = "rsstg" | | | 1 2 3 4 5 6 7 8 9 10 | [package] name = "rsstg" version = "0.1.2" authors = ["arcade"] edition = "2018" [dependencies] config = "*" futures = "*" |
| ︙ | ︙ |
Modified rsstg.sql
from [e1f26fd39a]
to [0ef80cd9ad].
| ︙ | ︙ | |||
29 30 31 32 33 34 35 | FOREIGN KEY (source_id) REFERENCES rsstg_source(source_id) ); create unique index rsstg_post__url on rsstg_post(url); create index rsstg_post__hour on rsstg_post(hour); create index rsstg_post__posted_hour on rsstg_post(posted,hour); create or replace view rsstg_order as | | | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
FOREIGN KEY (source_id) REFERENCES rsstg_source(source_id)
);
create unique index rsstg_post__url on rsstg_post(url);
create index rsstg_post__hour on rsstg_post(hour);
create index rsstg_post__posted_hour on rsstg_post(posted,hour);
create or replace view rsstg_order as
select source_id, coalesce(last_scrape + make_interval(0,0,0,0,0,(60 / (coalesce(activity, 1)/7 + 1) )::integer), now() - interval '1 minute') as next_fetch
from rsstg_source natural left join
(select source_id, count(*) as activity
from rsstg_post where
hour = extract('hour' from now())
and posted > now() - interval '7 days'
group by source_id) as act
where enabled
|
| ︙ | ︙ |
Modified src/main.rs
from [90b587ca65]
to [04985cd265].
| ︙ | ︙ | |||
236 237 238 239 240 241 242 |
#[tokio::main(basic_scheduler)]
async fn main() -> Result<()> {
let mut settings = config::Config::default();
settings.merge(config::File::with_name("rsstg"))?;
let re_username = Regex::new(r"^@[a-zA-Z][a-zA-Z0-9_]+$")?;
| | | 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 |
#[tokio::main(basic_scheduler)]
async fn main() -> Result<()> {
let mut settings = config::Config::default();
settings.merge(config::File::with_name("rsstg"))?;
let re_username = Regex::new(r"^@[a-zA-Z][a-zA-Z0-9_]+$")?;
let re_link = Regex::new(r"^https?://[a-zA-Z.0-9-]+/[-_a-zA-Z.0-9/?=]+$")?;
let re_iv_hash = Regex::new(r"^[a-f0-9]{14}$")?;
let core = Core::new(settings).await?;
let mut stream = core.stream();
while let Some(update) = stream.next().await {
|
| ︙ | ︙ |