Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update_feeds() scheduled=True overrides updates_enabled=True #365

Closed
lemon24 opened this issue Mar 10, 2025 · 1 comment
Closed

update_feeds() scheduled=True overrides updates_enabled=True #365

lemon24 opened this issue Mar 10, 2025 · 1 comment

Comments

@lemon24
Copy link
Owner

lemon24 commented Mar 10, 2025

update_feeds() scheduled=True overrides updates_enabled=True if a disabled feed has update_after set.

$ date
Mon Mar 10 11:51:37 UTC 2025

$ sqlite3 db.sqlite "delete from feeds where url not like '%twitter%'"
$ sqlite3 db.sqlite "select url, updates_enabled, update_after from feeds"
https://twitter.com/qntm|0|
https://twitter.com/tef_ebooks|0|
https://twitter.com/_andgravity|0|2025-03-10 12:01:00

$ sqlite3 db.sqlite "update feeds set update_after = '2025-03-10 10:01:00' where url like '%_andgravity%'"
$ /apps/reader/bin/python -m reader --db db.sqlite update -v
0 ok, 0 error, 0 not modified; entries: 0 new, 0 modified

$ sqlite3 db.sqlite "update feeds set update_after = '2025-03-10 10:01:00' where url like '%_andgravity%'"
$ /apps/reader/bin/python -m reader --db db.sqlite update -v --scheduled
0:00:00.436237	0/1	https://twitter.com/_andgravity	bad HTTP status code: 'https://twitter.com/_andgravity': requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://x.com/_andgravity
0 ok, 1 error, 0 not modified; entries: 0 new, 0 modified
@lemon24
Copy link
Owner Author

lemon24 commented Mar 10, 2025

Turns out the query emitted by update_feeds_iter(scheduled=True, updates_enabled=True) is:

SELECT
    ...
FROM
    feeds
WHERE
    updates_enabled AND
    update_after is NULL or update_after <= '2010-01-02 00:00:00'

... NOT, AND, OR 😐

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant