mirror of
https://github.com/xcat2/confluent.git
synced 2024-12-25 12:41:39 +00:00
Add implicit rescan on unmatched csv data
If the csv file contains criteria we can't match, implicitly try a rescan automatically to try to catch it.
This commit is contained in:
parent
005cefc914
commit
78e7381442
@ -19,6 +19,7 @@ import csv
|
||||
import optparse
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
|
||||
path = os.path.dirname(os.path.realpath(__file__))
|
||||
path = os.path.realpath(os.path.join(path, '..', 'lib', 'python'))
|
||||
@ -149,6 +150,10 @@ def import_csv(options, session):
|
||||
nodedatum[currfield] = datum
|
||||
if not datum_complete(nodedatum):
|
||||
sys.exit(1)
|
||||
if not search_record(nodedatum, options, session):
|
||||
list(session.update('/discovery/rescan',
|
||||
{'rescan': 'start'}))
|
||||
time.sleep(5)
|
||||
if not search_record(nodedatum, options, session):
|
||||
sys.stderr.write(
|
||||
"Could not match the following data: " +
|
||||
|
Loading…
Reference in New Issue
Block a user