Esempio n. 1
0
    def post_save(self, sender, document, created, **kwargs):
        """
        Post save hook handler

        - Index item in elasticsearch
        """
        # Index item in elasticsearch
        es_document_index.delay(document)
Esempio n. 2
0
    def post_save(self, sender, document, created, **kwargs):
        """
        Post save hook handler

        - Index item in elasticsearch
        """
        # Index item in elasticsearch
        es_document_index.delay(document)
Esempio n. 3
0
    def post_save(self, sender, document, created, **kwargs):
        """
        Post save hook handler
        
        - Removes related TTL
        - Index entity in elasticsearch
        """
        # Removes related TTL
        document.remove_related_ttl()

        # Index entity in elasticsearch
        es_document_index.delay(document)
Esempio n. 4
0
    def post_save(self, sender, document, **kwargs):
        """
        Post save hook handler

        - Refresh all related :class:`~core.models.VosaeUser` permissions.  
          Occurs in a delayed task.
        - Index group in elasticsearch
        """
        from core.tasks import cache_changed_permissions
        cache_changed_permissions.delay(document)

        # Index group in elasticsearch
        es_document_index.delay(document)
Esempio n. 5
0
    def post_save(self, sender, document, created, **kwargs):
        """
        Post save hook handler

        - Initialize user on creation
        - Index user in elasticsearch
        """
        from core.tasks import vosae_user_init
        if created:
            vosae_user_init.delay(document)

        # Index user in elasticsearch
        es_document_index.delay(document)
Esempio n. 6
0
    def post_save(self, sender, document, created, **kwargs):
        """
        Post save hook handler

        - Removes related TTL
        - Index invoice based document in elasticsearch
        - Add timeline and notification entries
        """
        # Removes related TTL
        document.remove_related_ttl()

        # Index invoice based document in elasticsearch
        es_document_index.delay(document)
Esempio n. 7
0
    def post_save(self, sender, document, created, **kwargs):
        """
        Post save hook handler

        - Initialize user on creation
        - Index user in elasticsearch
        """
        from core.tasks import vosae_user_init
        if created:
            vosae_user_init.delay(document)

        # Index user in elasticsearch
        es_document_index.delay(document)
Esempio n. 8
0
    def post_save(self, sender, document, created, **kwargs):
        """
        Post save hook handler

        - Removes related TTL
        - Index invoice based document in elasticsearch
        - Add timeline and notification entries
        """
        # Removes related TTL
        document.remove_related_ttl()

        # Index invoice based document in elasticsearch
        es_document_index.delay(document)
Esempio n. 9
0
    def post_save(self, sender, document, **kwargs):
        """
        Post save hook handler

        - Refresh all related :class:`~core.models.VosaeUser` permissions.  
          Occurs in a delayed task.
        - Index group in elasticsearch
        """
        from core.tasks import cache_changed_permissions
        cache_changed_permissions.delay(document)

        # Index group in elasticsearch
        es_document_index.delay(document)
Esempio n. 10
0
    def post_save(self, sender, document, created, **kwargs):
        """
        Post save hook handler

        - If next reminder in the timeframe, emits the task directly
        - Index event in elasticsearch
        - Update calendar iCal data
        """
        # If next reminder in the timeframe, emits the task directly
        document.check_immediate_reminders_emit()

        # Index event in elasticsearch
        es_document_index.delay(document)

        # Update calendar iCal data
        update_calendar_ical_data.delay(document.calendar)