server/hook.py
changeset 8394 b8b23af60019
parent 8393 77c7158916c1
child 8426 1cb51cdb4ce7
equal deleted inserted replaced
8393:77c7158916c1 8394:b8b23af60019
   172 Take note that relations can be added or deleted, but not updated.
   172 Take note that relations can be added or deleted, but not updated.
   173 
   173 
   174 Non data events
   174 Non data events
   175 ~~~~~~~~~~~~~~~
   175 ~~~~~~~~~~~~~~~
   176 
   176 
   177 Hooks called on server start/maintenance/stop event (eg `server_startup`,
   177 Hooks called on server start/maintenance/stop event (e.g.
   178 `server_maintenance`, `server_shutdown`) have a `repo` attribute, but *their
   178 `server_startup`, `server_maintenance`, `before_server_shutdown`,
   179 `_cw` attribute is None*.  The `server_startup` is called on regular startup,
   179 `server_shutdown`) have a `repo` attribute, but *their `_cw` attribute
   180 while `server_maintenance` is called on cubicweb-ctl upgrade or shell
   180 is None*.  The `server_startup` is called on regular startup, while
   181 commands. `server_shutdown` is called anyway.
   181 `server_maintenance` is called on cubicweb-ctl upgrade or shell
   182 
   182 commands. `server_shutdown` is called anyway but connections to the
   183 Hooks called on backup/restore event (eg 'server_backup', 'server_restore') have
   183 native source is impossible; `before_server_shutdown` handles that.
   184 a `repo` and a `timestamp` attributes, but *their `_cw` attribute is None*.
   184 
       
   185 Hooks called on backup/restore event (eg `server_backup`,
       
   186 `server_restore`) have a `repo` and a `timestamp` attributes, but
       
   187 *their `_cw` attribute is None*.
   185 
   188 
   186 Hooks called on session event (eg `session_open`, `session_close`) have no
   189 Hooks called on session event (eg `session_open`, `session_close`) have no
   187 special attribute.
   190 special attribute.
   188 
   191 
   189 
   192