Changeset 22
- Timestamp:
- 10/30/04 20:43:26
- Files:
-
- trunk/__init__.py (modified) (1 diff)
- trunk/codewalk.py (modified) (1 diff)
- trunk/doc/dejavu.css (modified) (1 diff)
- trunk/doc/framework.html (added)
- trunk/doc/index.html (modified) (3 diffs)
- trunk/doc/intro.html (modified) (1 diff)
- trunk/doc/storage.html (modified) (6 diffs)
- trunk/engines.py (modified) (1 diff)
- trunk/recur.py (added)
- trunk/storage/__init__.py (modified) (2 diffs)
- trunk/storage/storeado.py (modified) (5 diffs)
- trunk/storage/test.mdb (modified) (previous)
- trunk/test_dejavu.py (added)
- trunk/test_recur.py (added)
- trunk/xray.py (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/__init__.py
r21 r22 1 1 import ConfigParser 2 2 import datetime 3 import xray4 3 5 4 from dejavu.containers import * 6 5 from dejavu.analysis import * 7 6 from dejavu.readme import * 8 from dejavu import logic 7 from dejavu import logic, xray 9 8 10 9 trunk/codewalk.py
r21 r22 742 742 self.newcode = [] 743 743 744 # Add a list of 'and' and 'or' mappings {target: [(previous TOS, and _or_or)...]}744 # Add a list of 'and' and 'or' mappings {target: [(previous TOS, and/or)...]} 745 745 self.targets = {} 746 746 b = self._bytecode trunk/doc/dejavu.css
r21 r22 59 59 } 60 60 61 li { 62 margin-top: 0.35em; 63 margin-bottom: 0.35em; 64 } 61 65 62 66 /*, table { border: 2px dotted red } trunk/doc/index.html
r21 r22 72 72 <li>Loading Stores</li> 73 73 <li>Registering Unit Classes</li> 74 <li></li>75 74 </ul> 76 75 </li> … … 94 93 </ul> 95 94 </li> 95 <li>Recurrence Values</li> 96 96 </ul> 97 97 </li> … … 104 104 <li>Custom Storage Managers 105 105 <ul> 106 <li>Generic Database Wrappers</li> 106 <li>Generic Database Wrappers 107 <ul> 108 <li>Adapters</li> 109 <li>Decompiler</li> 110 <li>StorageManager</li> 111 </ul> 112 </li> 107 113 <li>ODBC</li> 108 114 <li>Other Serialization Mechanisms</li> trunk/doc/intro.html
r21 r22 201 201 In addition, the bytecode of Python may change from one version of Python 202 202 to another; if you find your version of Python does not work with Dejavu's 203 <tt>codewalk</tt> and <tt>logic</tt> modules, please let usknow.<br />203 <tt>codewalk</tt> and <tt>logic</tt> modules, please let me know.<br /> 204 204 </p> 205 205 trunk/doc/storage.html
r21 r22 82 82 83 83 <h5>Microsoft Access (Jet)</h5> 84 <p>This class was developed against ADO 2.7. </p>84 <p>This class was developed against ADO 2.7. Configuration entries:</p> 85 85 <ul> 86 86 <li><b>Class:</b> <tt>dejavu.storage.storeado.StorageManagerADO_MSAccess</tt></li> … … 104 104 105 105 <h5>Microsoft SQL Server</h5> 106 <p>This class was developed against ADO 2.7. </p>106 <p>This class was developed against ADO 2.7. Configuration entries:</p> 107 107 <ul> 108 108 <li><b>Class:</b> <tt>dejavu.storage.storeado.StorageManagerADO_SQLServer</tt></li> … … 126 126 127 127 <h5>ODBC</h5> 128 <p>This class doesn't currently work. It needs some updating.</p> 128 <p>This class doesn't currently work. It needs some updating. Configuration 129 entries:</p> 129 130 <ul> 130 131 <li><b>Class:</b> <tt>dejavu.storage.storeodbc.StorageManagerODBC</tt></li> … … 153 154 <h5>Caching Proxy</h5> 154 155 <p>Use this class to persist Units between client connections. It needs 155 another Storage Manager to proxy. </p>156 another Storage Manager to proxy. Configuration entries:</p> 156 157 <ul> 157 158 <li><b>Class:</b> <tt>dejavu.storage.CachingProxy</tt></li> 158 <li><b>Next Store:</b> Required. The n ext Storage Manager in the159 chain.</li>159 <li><b>Next Store:</b> Required. The name of the next Storage Manager 160 in the chain.</li> 160 161 <li><b>Lifetime:</b> Optional. The recurrence string which declares 161 162 how often to sweep Units out of the in-memory cache.</li> … … 167 168 Storage Manager recalls all Units at once upon the first request, and won't 168 169 recall them again from storage. They are "burned" into memory for the 169 lifetime of the application. </p>170 lifetime of the application. Configuration entries:</p> 170 171 <ul> 171 172 <li><b>Class:</b> <tt>dejavu.storage.BurnedProxy</tt></li> 172 <li><b>Next Store:</b> Required. The n ext Storage Manager in the173 chain.</li>173 <li><b>Next Store:</b> Required. The name of the next Storage Manager 174 in the chain.</li> 174 175 <li><b>Lifetime:</b> Optional. The recurrence string which declares 175 176 how often to sweep Units out of the in-memory cache. In general, … … 177 178 </ul> 178 179 180 <h4>Recurrence Values</h4> 181 <p>In the above Storage Managers, you might be asked to supply a "recurrence 182 string", which specifies a schedule for a given action. The string you 183 supply should be one of the following types:</p> 184 <ul> 185 <li><b>By units (intervals):</b> "3 hours" will run every 3 hours. 186 "7 days" or "1 week" will run once each week.</li> 187 <li><b>Daily:</b> "14:00 each day" will run at 2:00 P.M. every day.</li> 188 <li><b>Weekly:</b> "Mon", "Monday", or "Mondays" will run once each 189 Monday.</li> 190 <li><b>Monthly:</b> "20 each month" will run on the 20th of each month. 191 "0 every month" will run on the <i>last</i> day of each month.</li> 192 </ul> 193 179 194 180 195 </body> trunk/engines.py
r21 r22 14 14 import pickle 15 15 import dejavu 16 from dejavu import logic 16 from dejavu import logic, xray 17 17 import sets 18 import xray19 18 20 19 trunk/storage/__init__.py
r21 r22 4 4 import threading 5 5 import thread 6 import recur6 from dejavu import recur 7 7 try: 8 8 import cPickle as pickle … … 36 36 37 37 def create_storage(self, unitClass): 38 raise NotImplementedError38 pass 39 39 40 40 def reserve(self, unit): trunk/storage/storeado.py
r21 r22 12 12 except ImportError: 13 13 import pickle 14 import recur15 14 from types import FunctionType 16 15 … … 21 20 22 21 import dejavu 23 from dejavu import storage, codewalk, logic 22 from dejavu import storage, codewalk, logic, recur 24 23 25 24 adOpenForwardOnly = 0 … … 329 328 330 329 def visit_target(self, terms): 331 ## terms.reverse() 330 """A target is an AND or OR test.""" 332 331 comp = self.stack.pop() 333 332 while terms: … … 656 655 self.reserve_lock = threading.Lock() 657 656 658 def __del__(self):657 def shutdown(self): 659 658 if self._connection is not None: 660 659 self._connection.Close() … … 822 821 raise x 823 822 anRS.Update() 824 # Explicitly close here, or save_collection fails on BeginTrans. 823 # Need to explicitly close here, or save_collection 824 # will fail on BeginTrans. 825 825 anRS.Close() 826 826 if cls.__name__ == u'UnitCollection':
