diff --git a/src/main/groovy/seqeralabs/plugin/NfNIMExtension.groovy b/src/main/groovy/seqeralabs/plugin/NfNIMExtension.groovy index d6c9a7f..27979ec 100644 --- a/src/main/groovy/seqeralabs/plugin/NfNIMExtension.groovy +++ b/src/main/groovy/seqeralabs/plugin/NfNIMExtension.groovy @@ -18,9 +18,7 @@ package seqeralabs.plugin import groovy.transform.CompileStatic import nextflow.Session -import nextflow.plugin.extension.Function import nextflow.plugin.extension.PluginExtensionPoint - /** * Implements a custom function which can be imported by * Nextflow scripts. @@ -32,14 +30,4 @@ class NfNIMExtension extends PluginExtensionPoint { protected void init(Session session) { } - /** - * Say hello to the given target. - * - * @param target - */ - @Function - void sayHello(String target) { - println "Hello, ${target}!" - } - } diff --git a/src/main/groovy/seqeralabs/plugin/NfNIMFactory.groovy b/src/main/groovy/seqeralabs/plugin/NfNIMFactory.groovy index d5e4bf0..2751dc3 100644 --- a/src/main/groovy/seqeralabs/plugin/NfNIMFactory.groovy +++ b/src/main/groovy/seqeralabs/plugin/NfNIMFactory.groovy @@ -18,19 +18,18 @@ package seqeralabs.plugin import groovy.transform.CompileStatic import nextflow.Session -import nextflow.trace.TraceObserver -import nextflow.trace.TraceObserverFactory - +import nextflow.trace.TraceObserverFactoryV2 +import nextflow.trace.TraceObserverV2 /** * Implements a factory object required to create * the {@link NfNIMObserver} instance. */ @CompileStatic -class NfNIMFactory implements TraceObserverFactory { +class NfNIMFactory implements TraceObserverFactoryV2 { @Override - Collection create(Session session) { - return List.of(new NfNIMObserver()) + Collection create(Session session) { + return List.of(new NfNIMObserver()) } } diff --git a/src/main/groovy/seqeralabs/plugin/NfNIMObserver.groovy b/src/main/groovy/seqeralabs/plugin/NfNIMObserver.groovy index a955737..b19b13c 100644 --- a/src/main/groovy/seqeralabs/plugin/NfNIMObserver.groovy +++ b/src/main/groovy/seqeralabs/plugin/NfNIMObserver.groovy @@ -18,24 +18,13 @@ package seqeralabs.plugin import groovy.transform.CompileStatic import groovy.util.logging.Slf4j -import nextflow.Session -import nextflow.trace.TraceObserver - +import nextflow.trace.TraceObserverV2 /** * Implements an observer that allows implementing custom * logic on nextflow execution events. */ @Slf4j @CompileStatic -class NfNIMObserver implements TraceObserver { - - @Override - void onFlowCreate(Session session) { - println "Pipeline is starting! 🚀" - } +class NfNIMObserver implements TraceObserverV2 { - @Override - void onFlowComplete() { - // Pipeline completion - no message needed - } }