Skip to content

Commit 4a87e6b

Browse files
committed
Include file name change, add one more log stmt
1 parent 9ce4966 commit 4a87e6b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/server/api/API_ingest/salesforce_contacts.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def store_contacts_all():
2929
return
3030

3131
sf = Salesforce(username=os.getenv('SALESFORCE_USERNAME'), consumer_key=os.getenv('SALESFORCE_CONSUMER_KEY'),
32-
privatekey_file='server/bin/connected-app-secrets.pem')
32+
privatekey_file=pem_file)
3333
results = sf.query("SELECT Contact_ID_18__c, FirstName, LastName, Contact.Account.Name, MailingCountry, MailingStreet, MailingCity, MailingState, MailingPostalCode, Phone, MobilePhone, Email FROM Contact")
3434
logger.debug("%d total Salesforce contact records", results['totalSize'])
3535
if TEST_MODE:
@@ -59,5 +59,6 @@ def store_contacts_all():
5959
done = results['done'] if not TEST_MODE else True
6060
if not done:
6161
results = sf.query_more(results['nextRecordsUrl'], True)
62+
logger.debug("Committing downloaded contact records")
6263
session.commit()
6364
logger.debug("finished downloading latest salesforce contacts data")

0 commit comments

Comments
 (0)