Overview
Comment: | 0.1.11: optimize out one table, fix /add and /update, add /delete |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
f322efafd9b53ad8541a6d24aae75ccf |
User & Date: | arcade on 2020-11-30 19:49:57.922 |
Other Links: | manifest | tags |
Context
2020-12-07
| ||
19:17 | 0.1.12: add guards around checker, fix fetching next source, on check report errors to owner check-in: 5148f929f3 user: arcade tags: trunk | |
2020-11-30
| ||
19:49 | 0.1.11: optimize out one table, fix /add and /update, add /delete check-in: f322efafd9 user: arcade tags: trunk | |
2020-11-29
| ||
19:48 | added lock, detailed errors check-in: 39ee25f5c3 user: arcade tags: trunk | |
Changes
Modified Cargo.lock
from [3e772cfc3c]
to [91c8e501b9].
︙ | |||
65 66 67 68 69 70 71 | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | - + - + | [[package]] name = "async-global-executor" version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "async-executor 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", |
︙ | |||
115 116 117 118 119 120 121 | 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | - + - + | [[package]] name = "async-std" version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "async-global-executor 1.4.3 (registry+https://github.com/rust-lang/crates.io-index)", |
︙ | |||
479 480 481 482 483 484 485 | 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 | - + - + - + - + | source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "ident_case 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "strsim 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", |
︙ | |||
575 576 577 578 579 580 581 | 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 | - + | [[package]] name = "failure_derive" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", |
︙ | |||
728 729 730 731 732 733 734 | 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 | - + | name = "futures-macro" version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro-hack 0.5.19 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", |
︙ | |||
804 805 806 807 808 809 810 | 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 | - - - + + + | [[package]] name = "gloo-timers" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "futures-core 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", |
︙ | |||
1063 1064 1065 1066 1067 1068 1069 | 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 | - + - + | [[package]] name = "itoa" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "js-sys" |
︙ | |||
1548 1549 1550 1551 1552 1553 1554 | 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 | - + - + | [[package]] name = "pin-project-internal" version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", |
︙ | |||
1865 1866 1867 1868 1869 1870 1871 | 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 | - + | "derive_builder 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "quick-xml 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", "reqwest 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rsstg" |
︙ | |||
1992 1993 1994 1995 1996 1997 1998 | 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 | - + | [[package]] name = "serde_derive" version = "1.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", |
︙ | |||
2160 2161 2162 2163 2164 2165 2166 | 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 | - + | "futures 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", "sqlx-core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "sqlx-rt 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", |
︙ | |||
2208 2209 2210 2211 2212 2213 2214 | 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 | - + - + | [[package]] name = "subtle" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "syn" |
︙ | |||
2288 2289 2290 2291 2292 2293 2294 | 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 | - + | [[package]] name = "thiserror-impl" version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", |
︙ | |||
2402 2403 2404 2405 2406 2407 2408 | 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 | - + | [[package]] name = "tokio-macros" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", |
︙ | |||
2526 2527 2528 2529 2530 2531 2532 | 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 | - + | [[package]] name = "tracing-attributes" version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", |
︙ | |||
2696 2697 2698 2699 2700 2701 2702 | 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 | - + - - + + - + - - + + - + - - - - + + + + - + - + - + - - - + + + - + - + - - + + | [[package]] name = "wasi" version = "0.10.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "wasm-bindgen" |
︙ | |||
2845 2846 2847 2848 2849 2850 2851 | 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 | - + | "checksum ahash 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)" = "ad4243ec6feddc812c0f442d9765374d250aba94e10ecf8b632e1b1c118547e8" "checksum aho-corasick 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" "checksum anyhow 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)" = "bf8dcb5b4bbaa28653b647d8c77bd4ed40183b48882e130c1f1ffb73de069fd7" "checksum arrayvec 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" "checksum async-channel 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "59740d83946db6a5af71ae25ddf9562c2b176b2ca42cf99a455f09f4a220d6b9" "checksum async-executor 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "eb877970c7b440ead138f6321a3b5395d6061183af779340b65e20c0fede9146" "checksum async-global-executor 1.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "73079b49cd26b8fd5a15f68fc7707fc78698dc2a3d61430f2a7a9430230dfa04" |
︙ | |||
2954 2955 2956 2957 2958 2959 2960 | 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 | - + | "checksum ident_case 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" "checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" "checksum indexmap 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" "checksum instant 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec" "checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" "checksum itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" |
︙ | |||
3081 3082 3083 3084 3085 3086 3087 | 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 | - + | "checksum sqlx-macros 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c7acd32cba35531345f8a94a038874baf00efd0b701c913f5b00d2870b474b64" "checksum sqlx-rt 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "63fc5454c9dd7aaea3a0eeeb65ca40d06d0d8e7413a8184f7c3a3ffa5056190b" "checksum static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" "checksum string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" "checksum stringprep 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8ee348cb74b87454fff4b551cbf727025810a004f88aeacae7f85b87f4e9a1c1" "checksum strsim 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" "checksum subtle 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "343f3f510c2915908f155e94f17220b19ccfacf2a64a2a5d8004f2c3e311e7fd" |
︙ | |||
3135 3136 3137 3138 3139 3140 3141 | 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 | - - - - - - - + + + + + + + | "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" "checksum version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" "checksum waker-fn 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" "checksum want 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230" "checksum want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" "checksum wasi 0.10.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" "checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" |
Modified Cargo.toml
from [11f9855924]
to [8ef55973a6].
1 2 | 1 2 3 4 5 6 7 8 9 10 | - + | [package] name = "rsstg" |
︙ |
Modified rsstg.sql
from [7684f91d94]
to [eaca20cec6].
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | - - - - - - + - + | create table rsstg_updates (owner integer, update jsonb); create unique index rsstg_updates__id on rsstg_updates(update->>'update_id'); |
︙ |
Modified src/main.rs
from [ee7367a2d2]
to [aa11d5be5f].
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | - + | use sqlx::postgres::PgPoolOptions; use sqlx::Row; use sqlx::Done; // .rows_affected() #[macro_use] extern crate lazy_static; |
︙ | |||
48 49 50 51 52 53 54 | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 | - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + - + - + - - - - - + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + - + - + - + - + - - + + + - + - - + + - + | .connect_timeout(std::time::Duration::new(300, 0)) .idle_timeout(std::time::Duration::new(60, 0)) .connect_lazy(&settings.get_str("pg")?)?, }; let clone = core.clone(); tokio::spawn(async move { if let Err(err) = &clone.autofetch().await { |
︙ | |||
260 261 262 263 264 265 266 | 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 | - + | let core = Core::new(settings).await?; let mut stream = core.stream(); while let Some(update) = stream.next().await { if let Err(err) = handle(update?, &core).await { |
︙ | |||
298 299 300 301 302 303 304 | 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 | - + + - + + + + - - + + + + + + + + + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - + - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - + - - - - - - - - - - + | "/list" => { reply.append(&mut core.list(message.from.id).await?); }, // add "/add" | "/update" => { |
︙ | |||
469 470 471 472 473 474 475 476 477 478 479 480 481 482 | 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 | + + + + + + + + + + + + + + | }, Ok(number) => { let result = core.enable(&number, message.from.id).await?; reply.push(result.to_string()); }, }; }, // delete "/delete" => { match &words.next().unwrap().parse::<i32>() { Err(err) => { reply.push(format!("I need a number\\.\n{}", &err)); }, Ok(number) => { let result = core.delete(&number, message.from.id).await?; reply.push(result.to_string()); }, }; }, // disable "/disable" => { match &words.next().unwrap().parse::<i32>() { Err(err) => { reply.push(format!("I need a number\\.\n{}", &err)); |
︙ |