• Julien Muchembled's avatar
    Simulation: index 'delivery' categories in ZODB · 0a8fbb36
    Julien Muchembled authored
    Use of catalog to get related simulation movements from delivery lines/cells is
    unreliable.
    
    Until now, for any new code written for simulation, we often had to be careful
    not to call getDeliveryRelatedValueList too early, usually by deferring code
    to activities with complicated dependencies. Race conditions are difficult to
    avoid by developping this way, because for a given delivery, there are
    potentially so many events that happen at the same time, involving:
    - simulation, amongst causality, expand, building, solving (including split)
    - alarms, user actions, external interfaces, chains of activities
    - several related deliveries and simulation trees
    
    This commit enables ZODB-indexing of related documents for 'delivery' base
    category, making getDeliveryRelatedValueList safe and fixing unlink of
    deleted delivery lines/cells.
    
    Existing activity dependencies are left unchanged because builders only uses
    catalog and local building needs to find all simulation movements.
    0a8fbb36
movement_collection_updater.py 8.36 KB