Hey guys, there was some talk of task looping the other day, I have a similar question. I am converting a lambda. In said lambda one function outputs a list which I then iterate over. What is the prefect-est way to achieve this?
Copy code
def handler(event, context):
recipient_list = check_state()
service = service_account_login()
completed_samples = []
for r in recipient_list:
# message = create_message(recipient=r, email_from=EMAIL_FROM)
# send_message(service, USER_ID, message)
<http://logger.info|logger.info>(f"Message sent to {r[3]} for sampleid {r[4]}")
completed_samples.append(r[4])
# Write to state table for completed samples
write_state(completed_samples)
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.