onyx-platform / onyx-starter

Starter tutorial for working with Onyx
Eclipse Public License 1.0
73 stars 19 forks source link

Automatically calculate number of peers #16

Open keithharper opened 6 years ago

keithharper commented 6 years ago

Added the count-distinct-tasks function that calculates the number of peers based on the number of distinct tasks in the workflow.

keithharper commented 6 years ago

While going through the walkthrough, I decided to add a new branch to the workflow. While doing this, I mistakingly only counted 8 distinct tasks, when the actual count was 9. This was a silly error on my part, but running lein test simply returned a failed test, with all outputs as empty vectors, which was quite confusing.

Since there seems to be a lot to take in about this platform, I figured it would make more sense to calculate the number of distinct tasks with a function rather than a hard coded value.