Create an Azure function that is triggered by writing to the takmil registration container. Use the existing azure function as starter code for writing an Azure function and implement the below pseudocode
[func("registerStudent")]
Register(StudentModel model)
{
personGroup = NewOrExistingPersonGroup(model.school);
personGroupPerson = NewPerson(model.school, model.id);
foreach (photo in data.registration_photos)
{
add(dat.school, dat.person, photos);
}
var res = trainasync(dat.school);
// make repository calls to add to db
await res;
while (await trainingStatus != complete) {
await Task.Delay(1000);
}
// await any repository calls
prerequisite: Make StudentJsonModel
Create an Azure function that is triggered by writing to the takmil registration container. Use the existing azure function as starter code for writing an Azure function and implement the below pseudocode
[func("registerStudent")] Register(StudentModel model) { personGroup = NewOrExistingPersonGroup(model.school); personGroupPerson = NewPerson(model.school, model.id); foreach (photo in data.registration_photos) { add(dat.school, dat.person, photos); } var res = trainasync(dat.school); // make repository calls to add to db await res; while (await trainingStatus != complete) { await Task.Delay(1000); } // await any repository calls
}
Timeline
Week 6