|
7 | 7 | import argparse |
8 | 8 | import dsFunc |
9 | 9 |
|
10 | | -secretsVersion = input('To edit production server, enter the name of the \ |
11 | | -secrets file: ') |
12 | | -if secretsVersion != '': |
13 | | - try: |
14 | | - secrets = __import__(secretsVersion) |
15 | | - print('Editing Production') |
16 | | - except ImportError: |
17 | | - secrets = __import__('secrets') |
18 | | - print('Editing Development') |
19 | | -else: |
20 | | - secrets = __import__('secrets') |
21 | | - print('Editing Development') |
| 10 | +baseURL, email, password, filePath, verify, skipColl, sec = dsFunc.instSelect() |
22 | 11 |
|
23 | 12 | parser = argparse.ArgumentParser() |
24 | 13 | parser.add_argument('-k', '--key', help='the key to be added. optional - if \ |
|
50 | 39 |
|
51 | 40 | urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) |
52 | 41 |
|
53 | | -baseURL = secrets.baseURL |
54 | | -email = secrets.email |
55 | | -password = secrets.password |
56 | | -filePath = secrets.filePath |
57 | | -verify = secrets.verify |
58 | | -skippedCollections = secrets.skippedCollections |
59 | | - |
60 | 42 | startTime = time.time() |
61 | 43 | data = {'email': email, 'password': password} |
62 | 44 | header = {'content-type': 'application/json', 'accept': 'application/json'} |
|
81 | 63 | verify=verify).json() |
82 | 64 | for j in range(0, len(collections)): |
83 | 65 | collectionID = collections[j]['uuid'] |
84 | | - if collectionID not in skippedCollections: |
| 66 | + if collectionID not in skipColl: |
85 | 67 | offset = 0 |
86 | 68 | items = '' |
87 | 69 | while items != []: |
|
102 | 84 | itemID = items[k]['uuid'] |
103 | 85 | itemList.append(itemID) |
104 | 86 | offset = offset + 200 |
105 | | - |
| 87 | + |
106 | 88 | dsFunc.elapsedTime(startTime, 'Item list creation time') |
107 | 89 |
|
108 | 90 | recordsEdited = 0 |
|
0 commit comments