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

tld: add .tldcache command #1949

Merged
merged 1 commit into from
Nov 8, 2020
Merged

tld: add .tldcache command #1949

merged 1 commit into from
Nov 8, 2020

Conversation

dgw
Copy link
Member

@dgw dgw commented Oct 1, 2020

Description

Allows viewing last update time for both caches, forcing the cached data to update, and clearing the cached data from both bot memory and the bot's database.

Perhaps a bit messier than it could be, but I'm tired of resetting my test bot's database values for tonight.

Not mentioned in commit log: This change means anyone running from source will have to manually delete the 'tld' plugin's stored plugin values from the database, as the timestamp format has changed.

Checklist

  • I have read CONTRIBUTING.md
  • I can and do license this contribution under the EFLv2
  • No issues are reported by make qa (runs make quality and make test)
  • I have tested the functionality of the things this change touches

@dgw dgw added the Feature label Oct 1, 2020
@dgw dgw added this to the 7.1.0 milestone Oct 1, 2020
@dgw dgw requested a review from a team October 1, 2020 05:02
@dgw
Copy link
Member Author

dgw commented Oct 1, 2020

Yes, #1948 being accepted would mean that I should change the imports in here.

@lgtm-com
Copy link

lgtm-com bot commented Oct 1, 2020

This pull request introduces 1 alert when merging 852a1c0 into 54e4274 - view on LGTM.com

new alerts:

  • 1 for Unused import

@dgw
Copy link
Member Author

dgw commented Oct 1, 2020

That import thing that both LGTM and Travis flagged is exactly why I also opened #1948. Ignoring until that's either merged or dismissed with cause.

@dgw dgw force-pushed the tld-cache-management branch from 852a1c0 to c35f57b Compare October 8, 2020 14:26
@dgw
Copy link
Member Author

dgw commented Oct 8, 2020

I probably won't see until tonight, but that force-push should pass CI now that #1948 got merged.

@dgw
Copy link
Member Author

dgw commented Oct 8, 2020

Looks like I already have something to fix when I get home: py2.7 doesn't have datetime.timezone. Fun.

Copy link
Contributor

@Exirel Exirel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from that missing import pytz that should do it.

sopel/modules/tld.py Outdated Show resolved Hide resolved
sopel/modules/tld.py Outdated Show resolved Hide resolved
Allows viewing last update time, forcing the cached data to update, and
clearing the cached data from both bot memory and the bot's database.

Perhaps a *bit* messier than it could be, but I'm tired of resetting my
test bot's database values for tonight.
@dgw dgw force-pushed the tld-cache-management branch from c35f57b to 5e45e6d Compare October 8, 2020 23:17
@dgw
Copy link
Member Author

dgw commented Oct 8, 2020

@Exirel Believe it or not, I had already come up with the exact same changes on my own by the time your suggestions hit my email inbox. (And even if not, I'm also too lazy to apply suggestions and rebase when I could just git commit --amend --no-edit 😏)

@dgw dgw merged commit 650017f into master Nov 8, 2020
@dgw dgw deleted the tld-cache-management branch November 8, 2020 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants