Skip to main content

Configuration and code reload without Zope server restarts.

Project description

plone.reload

Overview

Configuration and code reload without server restarts.

This code is heavily based on the Products.RefreshNG product found at http://launchpad.net/refreshng.

The original xreload.py written by Guido van Rossum can be found at http://svn.python.org/projects/sandbox/trunk/xreload/xreload.py

It has some enhancements, but those seem to break more code than do any good in a Zope environment with patched in meta classes and monkey patches all over the place.

Usage

While being logged into the ZMI as a Manager user goto /@@reload on your Zope application root via a browser. If your Zope is configured to listen on port 8080 on localhost this is:

http://localhost:8080/@@reload

If you get a Resource not found error, make sure you have loaded this packages configure.zcml file and you really use the ZODB application root and not a Plone site as the base url.

When you press the Reload Code button, all modules that have been changed since the last time they were loaded are reloaded. You’ll get a status message telling you which modules have been reloaded.

To reload all ZCML without a restart, press the ‘Reload Code and ZCML’ button.

The action to perform is determined via a simple query string, so once you did a ‘Reload Code’ once, you can simply reload the browser page to execute the action once again.

Changelog

0.9 (2008-07-23)

  • Removed the manual cleanup approach for extra registries populated by ZCML parsing. Instead we use the registry of cleanup functions inside zope.testing.cleanup to automatically pick up all cleaning functions. [hannosch]

0.8 (2008-06-30)

  • Wrap the setupFinalLogging method of the Zope2 starter objects to initialize our internal modified times registry once after Zope is finished loading. This is the closest I could find that resembles a Zope is finished loading event and should help to remove the double-reload behavior. [hannosch]

  • Only expose the reload view in Zope 2 development mode. [hannosch]

  • In case of errors during ZCML reload, restore the original global site manager state, instead of leaving it in a broken state. This allows you to fix and retry the ZCML reload as many times as you need. [hannosch]

0.7 (2008-06-17)

  • Merged the two distinct views into one called @@reload. Added a somewhat nicer UI to it and explain some of the current limitations on that page. [hannosch]

  • Refactored ZCML loading code a bit. Always do an automatic code reload before reloading ZCML. [hannosch]

  • Removed all blacklisting code. [hannosch]

0.6 (2008-06-11)

  • Disabled blacklist until it can be made configurable. The speedup is hardly noticeable anyway, and it can block too much (especially if plone.reload is being used in a lib/python style deployment rather than as an egg). [optilude]

0.5 (2008-05-24)

0.4 (2008-03-01)

  • Made the code reload available as its own @@code_reload view. [hannosch]

  • Integrated xreload.py from RefreshNG and added a first working version of a general manual code reload feature. [hannosch]

0.3 (2008-02-21)

  • Fixed caching issues by invalidating all ZODB caches. If you have local site managers spread across multiple FileStorages this might still not work as expected. [hannosch]

  • Added cleanup for CMFCore and PAS. [hannosch]

0.2 (2008-01-25)

  • Added compatibility with Zope 2.10 / Plone 3.0. [hannosch]

0.1 (2008-01-25)

  • Initial implementation based heavily on Products.RefreshNG. [hannosch]

  • Initial package structure. [zopeskel]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plone.reload-0.9.tar.gz (16.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page