예제 #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)
예제 #2
0
파일: item.py 프로젝트: tcpr1/vosae-app
    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)
예제 #3
0
파일: entity.py 프로젝트: tcpr1/vosae-app
    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)
예제 #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)
예제 #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)
예제 #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)
예제 #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)
예제 #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)
예제 #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)
예제 #10
0
파일: event.py 프로젝트: tcpr1/vosae-app
    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)