From: Sapan Bhatia Date: Wed, 23 Jul 2014 14:51:16 +0000 (-0400) Subject: Refactored teh sync_volume_slice step with new style of deletion X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=cb947cef6c61fd4205002f0713a75ecc9f68d331;p=plstackapi.git Refactored teh sync_volume_slice step with new style of deletion --- diff --git a/planetstack/syndicate_observer/steps/sync_volumeslice.py b/planetstack/syndicate_observer/steps/sync_volumeslice.py index 8941b97..0fc6d4d 100644 --- a/planetstack/syndicate_observer/steps/sync_volumeslice.py +++ b/planetstack/syndicate_observer/steps/sync_volumeslice.py @@ -48,9 +48,6 @@ class SyncVolumeSlice(SyncStep): def __init__(self, **args): SyncStep.__init__(self, **args) - def fetch_pending(self): - return VolumeSlice.objects.filter(Q(enacted__lt=F('updated')) | Q(enacted=None)) - def sync_record(self, vs): logger.info("Sync VolumeSlice for (%s, %s)" % (vs.volume_id.name, vs.slice_id.name)) @@ -132,6 +129,10 @@ class SyncVolumeSlice(SyncStep): raise e return True + + # This method will simply cause the object to be purged from OpenCloud + def delete_record(self, volume_slice): + pass if __name__ == "__main__":