ngless-toolkit / ngless

NGLess: NGS with less work
https://ngless.embl.de
Other
142 stars 24 forks source link

Implement a setup phase for external modules #71

Open unode opened 6 years ago

unode commented 6 years ago

When using external modules we currently provide an init phase in addition to the actual execution phase. init can be used to test if all requirements to execute the module are satisfied.

On https://github.com/ngless-toolkit/ngless/commit/8459d7eb21a4231319a22c582b49f1194b65fcf8 I've introduced a lock such that init could be used for concurrent unsafe operations such as install/build software. The lock however gets in the way of execution since several jobs will fight for the same lock. Even worse, if a job fails during this phase, other jobs will be waiting for 24h+.

The discussed solution is to implement a setup phase that will lock but would be skipped once successfully finished. Much like a makefile rule with a setup.done target.