Пример #1
0
def call_webhooks(sender, **kwargs):  # pylint: disable=W0613
    """
    Call webhooks signal.
    """
    instance_id = kwargs['instance'].pk
    if ASYNC_POST_SUBMISSION_PROCESSING_ENABLED:
        call_service_async.apply_async(args=[instance_id], countdown=1)
    else:
        call_service_async(instance_id)
Пример #2
0
def post_save_submission(sender, **kwargs):
    parsed_instance = kwargs.get('instance')
    created = kwargs.get('created')

    if created:
        if ASYNC_POST_SUBMISSION_PROCESSING_ENABLED:
            call_service_async.apply_async(args=[parsed_instance.instance_id],
                                           countdown=1)

            save_osm_data_async.apply_async(args=[parsed_instance.instance_id],
                                            countdown=1)
        else:
            call_service_async(parsed_instance.instance_id)
            save_osm_data_async(parsed_instance.instance_id)
Пример #3
0
def call_webhooks(instance_id):
    if ASYNC_POST_SUBMISSION_PROCESSING_ENABLED:
        call_service_async.apply_async(
            args=[instance_id],
            countdown=1
        )

        save_osm_data_async.apply_async(
            args=[instance_id],
            countdown=1
        )
    else:
        call_service_async(instance_id)
        save_osm_data_async(instance_id)
Пример #4
0
def call_webhooks(sender, **kwargs):  # pylint: disable=W0613
    """
    Call webhooks signal.
    """
    instance_id = kwargs['instance'].pk
    call_service_async.apply_async(args=[instance_id], countdown=1)