Future publish_from will never show due to cache.
Reported by Gaspard Bucher | September 3rd, 2008 @ 12:46 PM | in 1.0
Originally posted on Trac by gaspard Original Trac Ticket
Description
Cached pages do not consider passing time (future publish_from dates). If we create a page in a project, the project might be cached and when the time comes for the page to be live publish_from , the project's cache will be served by apache and the new page will not show up.
Possible solutions
Fix the time to live of the cache to the minimum of it's "to be published" pages' publication date.
Create a table with scheduled events:
trigger_at when the event should run
event what to do
site_id site reference
With this in place, we need a cron job to check pending actions and when we publish with a publication time in the future, this happens:
Publish with publish_from = in 2 hours (same rights as publication needed).
- The only effect is that the version's status becomes ReadyToPublish? (45). Update 'trigger_at' for the event 'publish' for the given site.
- Every 1 (5?) minutes, a cron job checks the database for events to trigger. If it finds something, it calls curl with an url like '/heartbeat' (can only be called from localhost).
- When 'heartbeat' is called (we are inside running mongrel), the node is actually published by (super user ? version owner ? node owner ?).
- Doing a find for versions with status 45 in the current site, the 'publish' entry is either removed or updated.
- That's it
Reference: #10.
Comments and changes to this ticket
-
Gaspard Bucher September 3rd, 2008 @ 02:57 PM
- Milestone set to 1.0
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
Anyone knows how to use formatting here ?
Git repository: http://github.com/zena
Official website: http://zenadmin.org