Current Path : /usr/lib/python2.7/dist-packages/twisted/persisted/journal/ |
Current File : //usr/lib/python2.7/dist-packages/twisted/persisted/journal/base.pyc |
[XMc @ s1 d Z d d l m Z d d l Z d d l Z y d d l Z Wn e k r] d d l Z n Xd d l m Z m Z d d d YZ d e f d YZ d e f d YZ d e f d YZ d d d YZ d d d YZ d d d YZ e d Z d d d YZ e d Z d S( s) Basic classes and interfaces for journal.i( t nested_scopesN( t implementst Interfacet Journalc B sD e Z d Z d Z d Z d Z d Z d Z d Z RS( s} All commands to the system get routed through here. Subclasses should implement the actual snapshotting capability. c C s( | | _ | | _ | j j | _ d S( N( t logt journaledServicet getCurrentIndext latestIndex( t selfR R ( ( sB /usr/lib/python2.7/dist-packages/twisted/persisted/journal/base.pyt __init__ s c C s\ | j } | | j k rX x: | j j | d D] \ } } | j | j | q2 Wn d S( s Run all commands from log that haven't been run yet. This method should be run on startup to ensure the snapshot is up-to-date. i N( t getLastSnapshotR R t getCommandsSincet executeR ( R t snapshotIndext cmdtimet command( ( sB /usr/lib/python2.7/dist-packages/twisted/persisted/journal/base.pyt updateFromLog$ s #c C s; t j } | j j | | } | j | j | | | S( s Log and execute a command.( t timeR t logCommandt addCallbackt _reallyExecute( R R t runTimet d( ( sB /usr/lib/python2.7/dist-packages/twisted/persisted/journal/base.pyt executeCommand/ s c C s"