Skip to content

bump deps #604

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/server/api/API_ingest/updated_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def get_updated_contact_data():
with Session() as session:
result = session.execute(qry)
sfdata = result.fetchone()[0]
logger.debug(sfdata)
logger.debug("Query for Salesforce update returned %d records", len(sfdata))
return sfdata
if sfdata:
logger.debug(sfdata)
logger.debug("Query for Salesforce update returned %d records", len(sfdata))
return sfdata
24 changes: 16 additions & 8 deletions src/server/api/internal_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,24 +45,29 @@ def ingest_raw_data():
def get_contact_data():
logger.debug("Calling get_updated_contact_data()")
contact_json = updated_data.get_updated_contact_data()
logger.debug("Returning %d contact records", len(contact_json))
return jsonify(contact_json), 200
if contact_json:
logger.debug("Returning %d contact records", len(contact_json))
else:
logger.debug("No contact records found")
return jsonify({'outcome': 'OK'}), 200


@internal_api.route("/api/internal/start_flow", methods=["GET"])
def run_flow():
logger.debug("Calling flow_script.start_flow()")
flow_script.start_flow()
logger.debug("Flow processing complete")
return jsonify(''), 200
return jsonify({'outcome': 'OK'}), 200


@internal_api.route("/api/internal/send_salesforce_platform_message", methods=["GET"])
def send_salesforce_platform_message():
contact_list = updated_data.get_updated_contact_data()
logger.debug("Returning %d contact records", len(contact_list))
salesforce_message_publisher.send_pipeline_update_messages(contact_list)

if contact_list:
logger.debug("Returning %d contact records", len(contact_list))
salesforce_message_publisher.send_pipeline_update_messages(contact_list)
else:
logger.debug("No contact records found")
return jsonify({'outcome': 'OK'}), 200

@internal_api.route("/api/internal/full_flow", methods=["GET"])
Expand All @@ -73,7 +78,10 @@ def start_flow():
flow_script.start_flow()
logger.info("Building updated data payload")
updated_contacts_list = updated_data.get_updated_contact_data()
logger.info("Sending Salesforce platform messages")
salesforce_message_publisher.send_pipeline_update_messages(updated_contacts_list)
if updated_contacts_list:
logger.info("Sending Salesforce platform messages")
salesforce_message_publisher.send_pipeline_update_messages(updated_contacts_list)
else:
logger.info("No contacts to update")

return jsonify({'outcome': 'OK'}), 200
10 changes: 5 additions & 5 deletions src/server/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
Flask==1.1.2
Flask==3.0.1
sqlalchemy==1.4.15
psycopg2-binary==2.9.1
openpyxl
requests
pytest
flask-jwt-extended==4.0.2
flask-jwt-extended==4.6.0
alembic
flask-cors
dropbox
jellyfish
networkx
jinja2<3.1.0
itsdangerous==2.0.1 # TODO: upgrade flask so we don't have to do this
Jinja2>=3.1.2
itsdangerous>=2.1.2
simple-salesforce
werkzeug==2.0.3
werkzeug==3.0.1
structlog
pyjwt
cryptography
Expand Down