Aufruf mit -use_local möglich, so dass auch das kopieren vom Netzlaufwerk nicht stattfindet.
This commit is contained in:
@@ -31,7 +31,7 @@ class FetchSivasTeilestamm:
|
|||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
parser = argparse.ArgumentParser(description='fetches data from sivas or ruledesigner fusion', prog='update_database')
|
parser = argparse.ArgumentParser(description='fetches data from sivas or ruledesigner fusion', prog='update_database')
|
||||||
parser.add_argument('-s', '--sivasid', action='store', help='fetch teilestamm-data for all unmigrated parts in the bom of a given asm-id. Specifiy multiple ids as comma separated values without space, e.g. 200000089,200000090', metavar='id(s)')
|
parser.add_argument('-s', '--sivasid', action='store', help='fetch teilestamm-data for all unmigrated parts in the bom of a given asm-id. Specifiy multiple ids as comma separated values without space, e.g. 200000089,200000090', metavar='id(s)')
|
||||||
parser.add_argument('-l', '--uselocal', action='store_true', help='Do not connect to database. Use local files (if already existing) for the given asm-id')
|
parser.add_argument('-l', '--uselocal', action='store_true', help='Do not connect to database. Use local files (if already existing) for the given asm-id', default=False)
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
@@ -43,7 +43,8 @@ if __name__ == '__main__':
|
|||||||
if args.uselocal:
|
if args.uselocal:
|
||||||
sivas_teilestamm.use_local(args.uselocal)
|
sivas_teilestamm.use_local(args.uselocal)
|
||||||
sivas_teilestamm.fetch_from_db()
|
sivas_teilestamm.fetch_from_db()
|
||||||
sivas_teilestamm.get_unmigrated_teilstamm_csvs()
|
if args.uselocal == False:
|
||||||
|
sivas_teilestamm.get_unmigrated_teilstamm_csvs(args.uselocal)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
parser.print_help()
|
parser.print_help()
|
||||||
Reference in New Issue
Block a user