Skip to content

Add output dir to tower trace [POC] #6056

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import nextflow.trace.TraceObserver
import nextflow.trace.TraceRecord
import nextflow.util.Duration
import nextflow.util.LoggerHelper
import nextflow.util.PathTrie
import nextflow.util.ProcessHelper
import nextflow.util.SimpleHttpClient
import nextflow.util.TestOnly
Expand All @@ -70,6 +71,8 @@ class TowerClient implements TraceObserver {

static private final String TOKEN_PREFIX = '@token:'

final PathTrie trie = new PathTrie()

@TupleConstructor
static class Response {
final int code
Expand Down Expand Up @@ -408,6 +411,7 @@ class TowerClient implements TraceObserver {
final req = makeCompleteReq(session)
final resp = sendHttpMessage(urlTraceComplete, req, 'PUT')
logHttpResponse(urlTraceComplete, resp)
log.info "Output dir=${trie.longest()}"
}

@Override
Expand Down Expand Up @@ -487,6 +491,7 @@ class TowerClient implements TraceObserver {
@Override
void onFilePublish(Path destination) {
reports.filePublish(destination)
trie.add(destination)
}

protected void refreshToken(String refresh) {
Expand Down