trouble with TaskMultiplier plugin and task_dependency not existing

5 views
Skip to first unread message

Dave

unread,
Nov 4, 2016, 3:39:20 PM11/4/16
to nikola-discuss
Am trying to write a task multiplier plugin that will multiply out after a render_x task.

I have copied the gzip multiplier task in the default install but am getting:

>ERROR: render_site. Task dependency 'render_site_validate_render_output' does not exist.

where validate_render_output is the name of my task


Am a bit confused (well more than a bit :)) on what the task_dependency actually does.  "render_site_validate_render_output" doesn't exist as it is just the two tasks names joined together, but that doesn't seem to be an issue for the gzip module where "render_site_gzip" does seem to exist (although I cannot figure out why it exists


Chris Warrick

unread,
Nov 4, 2016, 3:55:57 PM11/4/16
to Nikola—Discuss
I just copied the built-in gzip plugin and changed all names to
something else, it works fine. Pastebin your plugin’s code and share a
link on the list.

--
Chris Warrick <https://chriswarrick.com/>
PGP: 5EAAEA16

prosrcmedia

unread,
Nov 4, 2016, 4:42:19 PM11/4/16
to nikola-...@googlegroups.com
I must have been doing something to break it. I copied the gzip example
and like you, just changed names this time and it works.


I think what I want to do is not possible and it was modifying the gzip
plugin to do it that was causing the error I posted before



Basically, after a page / post / index is generated via render_pages/
render_posts have another task that will read the output and check for

System Error (or whatever the actual error is) that indicates malformed
markup.


At the moment, I generate my site, then grep the output files for the
error string.


But I want to move that into a plugin so the build process can error out
nicely


Further investigation it seems TaskMultiplier must have a unique target,
which I don't want. So I don't think TaskMultiplier is the plugin I
need. Actually, just noticed the signal: Compiled. Which should do the
trick, never noticed that one before


Cheers

Chris Warrick

unread,
Nov 5, 2016, 4:31:50 AM11/5/16
to Nikola—Discuss
On 4 November 2016 at 21:42, prosrcmedia <prosr...@gmail.com> wrote:
> I must have been doing something to break it. I copied the gzip example and
> like you, just changed names this time and it works.
>
>
> I think what I want to do is not possible and it was modifying the gzip
> plugin to do it that was causing the error I posted before
>
>
>
> Basically, after a page / post / index is generated via render_pages/
> render_posts have another task that will read the output and check for
>
> System Error (or whatever the actual error is) that indicates malformed
> markup.
>
>
> At the moment, I generate my site, then grep the output files for the error
> string.
>
>
> But I want to move that into a plugin so the build process can error out
> nicely
>
>
> Further investigation it seems TaskMultiplier must have a unique target,
> which I don't want. So I don't think TaskMultiplier is the plugin I need.
> Actually, just noticed the signal: Compiled. Which should do the trick,
> never noticed that one before
>
>
> Cheers

So basically, you want to stop the build when there is a reST error?
That could be implemented in Nikola core if that’s what you want.

prosrcmedia

unread,
Nov 5, 2016, 10:02:36 AM11/5/16
to nikola-...@googlegroups.com
>>
>> So basically, you want to stop the build when there is a reST error?

yes. Usually I forget to grep the output, so end up deploying pages with
errors.


>>> That could be implemented in Nikola core if that’s what you want.

I already wrote a plugin yesterday using: signal: Compiled. But it might
be useful in core. I cannot be the only one who makes lots of markup
errors :)

Actually, I also wrote a plugin to try and fix typical markup errors,
missing line breaks, missing space in meta lines etc


I was going to submit them to the plugins section on github once have
tested them a bit more as they currently cause more problems than they
solve. That's todays plan


Cheers
Reply all
Reply to author
Forward
0 new messages