Skip to content

Commit

Permalink
Remove deprecated TowerArchiver feature
Browse files Browse the repository at this point in the history
Signed-off-by: Paolo Di Tommaso <[email protected]>
  • Loading branch information
pditommaso committed Oct 30, 2023
1 parent 35609cb commit ff8e06a
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 431 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package io.seqera.tower.plugin

import groovy.transform.CompileStatic
import groovy.util.logging.Slf4j
import nextflow.Session
import nextflow.cli.PluginAbstractExec
/**
* Implements nextflow cache and restore commands
Expand All @@ -37,7 +36,6 @@ class CacheCommand implements PluginAbstractExec {

if( cmd == 'cache-backup') {
cacheBackup()
archiveLogs(session)
}
if( cmd == 'cache-restore' )
cacheRestore()
Expand All @@ -55,18 +53,6 @@ class CacheCommand implements PluginAbstractExec {
}
}

protected void archiveLogs(Session sess) {
// archive logs
final archiver = TowerArchiver.create(sess, System.getenv())
if( archiver ) try {
log.debug "Running Nextflow logs archiver"
archiver.archiveLogs()
}
finally {
archiver.shutdown(sess)
}
}

protected void cacheRestore() {
if( !getSession().cloudCachePath ) {
log.debug "Running Nextflow cache restore"
Expand Down
256 changes: 0 additions & 256 deletions plugins/nf-tower/src/main/io/seqera/tower/plugin/TowerArchiver.groovy

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ class TowerClient implements TraceObserver {

private TowerReports reports

private TowerArchiver archiver

/**
* Constructor that consumes a URL and creates
Expand All @@ -151,7 +150,6 @@ class TowerClient implements TraceObserver {
this.schema = loadSchema()
this.generator = TowerJsonGenerator.create(schema)
this.reports = new TowerReports(session)
this.archiver = TowerArchiver.create(session, env)
}

TowerClient withEnvironment(Map env) {
Expand Down Expand Up @@ -401,8 +399,6 @@ class TowerClient implements TraceObserver {
final req = makeCompleteReq(session)
final resp = sendHttpMessage(urlTraceComplete, req, 'PUT')
logHttpResponse(urlTraceComplete, resp)
// shutdown file archiver
archiver?.shutdown(session)
}

@Override
Expand Down Expand Up @@ -446,7 +442,6 @@ class TowerClient implements TraceObserver {
aggregator.aggregate(trace)
}

archiver?.archiveTaskLogs(trace.workDir)
}

@Override
Expand Down Expand Up @@ -482,9 +477,7 @@ class TowerClient implements TraceObserver {
*/
@Override
void onFilePublish(Path destination) {
final result = reports.filePublish(destination)
if( result && archiver )
archiver.archiveFile(destination)
reports.filePublish(destination)
}

protected void refreshToken(String refresh) {
Expand Down
Loading

0 comments on commit ff8e06a

Please sign in to comment.