This repository was archived by the owner on Aug 26, 2022. It is now read-only.
bug 766252: Deferred and singleton page rendering#318
Merged
Conversation
Contributor
Author
|
Oh also, this should fix https://bugzilla.mozilla.org/show_bug.cgi?id=765649 |
Contributor
There was a problem hiding this comment.
should we add:
if not self.defer_rendering:
return False
?
Contributor
Author
There was a problem hiding this comment.
No. This function is about whether a rendering has been scheduled, which is valid whether or not the document should be rendered in the offline queue. (ie. A rendering is considered scheduled, even if it happens on-demand in the request/response cycle)
* Documents can be rendered on demand or offloaded into the Celery queue
* Documents with `defer_rendering == True` are rendered with Celery
queue tasks. Otherwise, rendering is attempted on demand during
the request/reasponse cycle.
* If a Document takes too long to render, `defer_rendering` is
automatically set to True. This time limit is controlled by
KUMA_DOCUMENT_FORCE_DEFERRED_TIMEOUT in Constance settings
* Allow only one rendering per Document at any given time. Additional
attempts to render a Document while already in progress results in a
warning message and/or stale content while the rendering finishes.
* Rendered content is now kept in the DB, rather than temporary cache
* Lots of additional Document fields to track rendering state, store
rendered content, and control deferred rendering.
* Reload no longer triggers a render of the page. However, editing and
saving a Document does.
* Shift-Reload by a logged-in user schedules a fresh render, assuming
there's not one already in progress.
* Display warning messages about the render status of a page. But, only
for logged-in users to keep search engine crawlers from indexing them.
* Display detailed Kumascript errors only to logged in users, also to
avoid search indexing.
* Document rendering via kumascript refactored out of views.py and into
models.py and kumascript.py
* Disable schedule_rebuild_kb and _maybe_schedule_rebuild in favor of
new Document rendering system.
* Tweaks to Document admin to allow mass enable/disable of deferred
rendering, link to public URL of Documents.
* Reenable celery queue in settings_local, tweaks to failing tests
* manage.py command for manually triggering or queuing a page render
Contributor
Author
|
I just did a rebase with current master, and fixed the missing |
groovecoder
added a commit
that referenced
this pull request
Jul 2, 2012
bug 766252: Deferred and singleton page rendering
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dropping this bomb of a PR now and then stepping away from it for awhile. There's a lot here. I recommend reading all the commit log bullet points, and then review the tests before digging into any other code. This should run both with and without a Celery queue and celeryd running.
defer_rendering == Trueare rendered with Celeryqueue tasks. Otherwise, rendering is attempted on demand during
the request/reasponse cycle.
defer_renderingisautomatically set to True. This time limit is controlled by
KUMA_DOCUMENT_FORCE_DEFERRED_TIMEOUT in Constance settings
attempts to render a Document while already in progress results in a
warning message and/or stale content while the rendering finishes.
rendered content, and control deferred rendering.
saving a Document does.
there's not one already in progress.
for logged-in users to keep search engine crawlers from indexing them.
avoid search indexing.
models.py and kumascript.py
new Document rendering system.
rendering, link to public URL of Documents.