File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -351,14 +351,19 @@ class MyObserverFactory implements TraceObserverFactory {
351
351
// MyObserver.groovy
352
352
import java.nio.file.Path
353
353
354
+ import nextflow.Session
354
355
import nextflow.processor.TaskHandler
355
356
import nextflow.trace.TraceObserver
356
357
import nextflow.trace.TraceRecord
357
358
358
359
class MyObserver implements TraceObserver {
360
+ private Session session
359
361
360
362
@Override
361
- void onFlowBegin() {
363
+ void onFlowCreate(Session session) {
364
+ // store the session for later use
365
+ this.session = session
366
+
362
367
println "Okay, let's begin!"
363
368
}
364
369
@@ -372,9 +377,14 @@ class MyObserver implements TraceObserver {
372
377
println "I found a task in the cache! It's name is '${handler.task.name}'"
373
378
}
374
379
380
+ @Override
381
+ void onFileStage(Path destination, Path source) {
382
+ println("I staged a file from '${source.toUriString()}' to '${destination.toUriString()}'")
383
+ }
384
+
375
385
@Override
376
386
void onFilePublish(Path destination, Path source) {
377
- println "I published a file! It's located at ${path .toUriString()}"
387
+ println "I published a file! It's located at '${destination .toUriString()}' "
378
388
}
379
389
380
390
@Override
You can’t perform that action at this time.
0 commit comments