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

Throttling doesn't apply to posts without webmentions #84

Closed
jordanmerrick opened this issue Aug 18, 2018 · 8 comments
Closed

Throttling doesn't apply to posts without webmentions #84

jordanmerrick opened this issue Aug 18, 2018 · 8 comments

Comments

@jordanmerrick
Copy link

jordanmerrick commented Aug 18, 2018

I've recently added webmentions to my Jekyll blog, which has ~800 posts going back a number of years. Only about four recent posts have received webmentions. My site's build time has jumped to around five minutes, but throttling seems to make no difference. I'm using the following throttling configuration:

  throttle_lookups:
    last_week: daily
    last_month: weekly
    last_year: every 2 weeks
    older: monthly

What I seem to be experiencing is that only posts which have received webmentions are throttled. So for all other posts that have no webmentions, they're checked every time. Is that right? If so, can there be a way to specify that throttling should apply to all posts, not just ones that have received webmentions previously? In my case, this could possibly decrease build times significantly.

@aarongustafson
Copy link
Owner

Good point. Let me get on that. I think I finally need to bust out the lookups into a separate file.

@aarongustafson
Copy link
Owner

This fix is in v2.9.5

@jordanmerrick
Copy link
Author

Thank you!

@jordanmerrick
Copy link
Author

@aarongustafson I've just updated but am running into the error

undefined method `dig' for nil:NilClass (NoMethodError)`

With --trace:

[jekyll-webmention_io] Beginning to gather webmentions of your posts. This may take a while. 
/var/lib/gems/2.3.0/gems/jekyll-webmention_io-2.9.5/lib/jekyll/generators/gather_webmentions.rb:61:in `check_for_webmentions': undefined method `dig' for nil:NilClass (NoMethodError)
from /var/lib/gems/2.3.0/gems/jekyll-webmention_io-2.9.5/lib/jekyll/generators/gather_webmentions.rb:42:in `block in generate'
from /var/lib/gems/2.3.0/gems/jekyll-webmention_io-2.9.5/lib/jekyll/generators/gather_webmentions.rb:41:in `each'
from /var/lib/gems/2.3.0/gems/jekyll-webmention_io-2.9.5/lib/jekyll/generators/gather_webmentions.rb:41:in `generate'
from /var/lib/gems/2.3.0/gems/jekyll-3.8.3/lib/jekyll/site.rb:175:in `block in generate'
from /var/lib/gems/2.3.0/gems/jekyll-3.8.3/lib/jekyll/site.rb:173:in `each'
from /var/lib/gems/2.3.0/gems/jekyll-3.8.3/lib/jekyll/site.rb:173:in `generate'
from /var/lib/gems/2.3.0/gems/jekyll-3.8.3/lib/jekyll/site.rb:70:in `process'
from /var/lib/gems/2.3.0/gems/jekyll-3.8.3/lib/jekyll/command.rb:28:in `process_site'
from /var/lib/gems/2.3.0/gems/jekyll-3.8.3/lib/jekyll/commands/build.rb:65:in `build'
from /var/lib/gems/2.3.0/gems/jekyll-3.8.3/lib/jekyll/commands/build.rb:36:in `process'
from /var/lib/gems/2.3.0/gems/jekyll-3.8.3/lib/jekyll/commands/serve.rb:93:in `block in start'
from /var/lib/gems/2.3.0/gems/jekyll-3.8.3/lib/jekyll/commands/serve.rb:93:in `each'
from /var/lib/gems/2.3.0/gems/jekyll-3.8.3/lib/jekyll/commands/serve.rb:93:in `start'
from /var/lib/gems/2.3.0/gems/jekyll-3.8.3/lib/jekyll/commands/serve.rb:75:in `block (2 levels) in init_with_program'
from /var/lib/gems/2.3.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
from /var/lib/gems/2.3.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
from /var/lib/gems/2.3.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
from /var/lib/gems/2.3.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
from /var/lib/gems/2.3.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
from /var/lib/gems/2.3.0/gems/jekyll-3.8.3/exe/jekyll:15:in `<top (required)>'
from /usr/local/bin/jekyll:23:in `load'
from /usr/local/bin/jekyll:23:in `<main>'

@aarongustafson
Copy link
Owner

aarongustafson commented Aug 31, 2018 via email

@jordanmerrick
Copy link
Author

@aarongustafson sure, here's the additional debug info:

 Incremental build: disabled. Enable with --incremental
      Generating... 
[jekyll-webmention_io] Beginning to gather webmentions of your posts. This may take a while. 
[jekyll-webmention_io] Checking for webmentions of /posts/185205195243. 
jekyll 3.8.3 | Error:  undefined method `dig' for nil:NilClass

@aarongustafson
Copy link
Owner

aarongustafson commented Aug 31, 2018

Try now. I added an additional conditional around the code I think is causing the issue for you. v2.9.6

@jordanmerrick
Copy link
Author

@aarongustafson thanks for fixing, working fine now. And build time has dropped to less than two minutes, so a big improvement overall.

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

No branches or pull requests

2 participants