def export_request_task(export_request_id):
    celery_logger.info("export_request_task task started at %s." % timezone.now())
    export_request = ExportRequest.objects.get(id=export_request_id)
    export_request.status = 'processing'
    export_request.save()

    (orig_managerCls, orig_creds) = export_request.prepare_manager()
    default_kwargs = export_request.get_export_args()
    file_loc = export_source(orig_managerCls, orig_creds, default_kwargs)

    celery_logger.info("export_request_task task finished at %s." % timezone.now())
    return file_loc
示例#2
0
def export_request_task(export_request_id):
    celery_logger.info("export_request_task task started at %s." % timezone.now())
    export_request = ExportRequest.objects.get(id=export_request_id)
    export_request.status = 'processing'
    export_request.save()

    (orig_managerCls, orig_creds) = export_request.prepare_manager()
    default_kwargs = export_request.get_export_args()
    file_loc = export_source(orig_managerCls, orig_creds, default_kwargs)

    celery_logger.info("export_request_task task finished at %s." % timezone.now())
    return file_loc