def resume_building_data_source(request, domain, config_id): config, is_static = get_datasource_config_or_404(config_id, domain) if not is_static and config.meta.build.finished: messages.warning( request, _(u'Table "{}" has already finished building. Rebuild table to start over.').format( config.display_name ) ) elif not DataSourceResumeHelper(config).has_resume_info(): messages.warning( request, _(u'Table "{}" did not finish building but resume information is not available. ' u'Unfortunately, this means you need to rebuild the table.').format( config.display_name ) ) else: messages.success( request, _(u'Resuming rebuilding table "{}".').format(config.display_name) ) resume_building_indicators.delay(config_id, request.user.username) return HttpResponseRedirect(reverse( EditDataSourceView.urlname, args=[domain, config._id] ))
def resume_building_data_source(request, domain, config_id): config, is_static = get_datasource_config_or_404(config_id, domain) if not is_static and config.meta.build.finished: messages.warning( request, _('Table "{}" has already finished building. Rebuild table to start over.').format( config.display_name ) ) else: messages.success( request, _('Resuming rebuilding table "{}".').format(config.display_name) ) resume_building_indicators.delay(config_id) return HttpResponseRedirect(reverse('edit_configurable_data_source', args=[domain, config._id]))
def resume_building_data_source(request, domain, config_id): config, is_static = get_datasource_config_or_404(config_id, domain) if not is_static and config.meta.build.finished: messages.warning( request, _(u'Table "{}" has already finished building. Rebuild table to start over.' ).format(config.display_name)) elif not DataSourceResumeHelper(config).has_resume_info(): messages.warning( request, _(u'Table "{}" did not finish building but resume information is not available. ' u'Unfortunately, this means you need to rebuild the table.'). format(config.display_name)) else: messages.success( request, _(u'Resuming rebuilding table "{}".').format(config.display_name)) resume_building_indicators.delay(config_id, request.user.username) return HttpResponseRedirect( reverse(EditDataSourceView.urlname, args=[domain, config._id]))