예제 #1
0
def ajax_reset_dedup_config(request, data):
    success = True
    error_message = ""
    config_values = {}

    try:
        DedupConfiguration.reset()
        dedup_config = DedupConfiguration.get()
        config_values = dedup_config.to_dict()
    except Exception, e:
        success = False
        log_error(e, 'Fts config')
예제 #2
0
def ajax_set_dedup_config(request, data):
    success = True
    error_message = ""

    try:
        DedupConfiguration.set_from_dict(data)
    except Exception, e:
        success = False
        if isinstance(e, KeyError):
            error_message = 'value missing: %s' % e.message
        else:
            error_message = e.message
        log_error(e, 'DEDUP config')
예제 #3
0
def update_main(force_start=False, **kwargs):
    try:
        stix_dedup = STIXDedup(DedupConfiguration.get())
        stix_dedup.run()
    except Exception as e:
        crashlog.save('dedup_job', e.message, traceback.format_exc())
        raise

    return 0