Skip to content

Commit

Permalink
fixed comments'
Browse files Browse the repository at this point in the history
  • Loading branch information
aditya-el committed Oct 4, 2024
1 parent b921c7b commit bec4c74
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 27 deletions.
19 changes: 1 addition & 18 deletions plugins/nf-polly/src/main/nextflow/polly/PollyFactory.groovy
Original file line number Diff line number Diff line change
@@ -1,29 +1,12 @@
/*
* Copyright 2021, Seqera Labs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package nextflow.polly

import groovy.transform.CompileStatic
import nextflow.Session
import nextflow.trace.TraceObserver
import nextflow.trace.TraceObserverFactory

/**
* Implements the validation observer factory
*
* @author Paolo Di Tommaso <[email protected]>
*/
@CompileStatic
class PollyFactory implements TraceObserverFactory {
Expand Down
19 changes: 10 additions & 9 deletions plugins/nf-polly/src/main/nextflow/polly/PollyObserver.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class PollyObserver implements TraceObserver {
* ...
* polly {
* metricsStreamName = "my-kinesis-stream"
* graphObserverStreamName = "pravaah-dev-graph-observer-stream-v1"
* }
*/
private PollyConfig config
Expand All @@ -57,23 +58,23 @@ class PollyObserver implements TraceObserver {

@Override
void onFlowCreate(Session session) {
log.info "-------Pipeline is starting! πŸš€-----------"
log.info "-------Pipeline is starting-----------"
this.session = session
this.config = new PollyConfig(session.config.navigate('polly') as Map)
this.env = session.config.navigate('env') as Map
}

@Override
void onFlowComplete() {
log.info "----------Pipeline complete! πŸ‘‹-------------"
log.info "----------Pipeline complete-------------"
}

/*
* Invoked when the process is created.
*/
@Override
void onProcessCreate(TaskProcessor process ){
log.info "-------------------Process Created! πŸ‘‹-------------------"
log.info "-------------------Process Created-------------------"
log.info process.getName()
putRecordToObserverStream(ProcessStatus.CREATED, process.name)
}
Expand All @@ -83,7 +84,7 @@ class PollyObserver implements TraceObserver {
*/
@Override
void onProcessTerminate( TaskProcessor process ){
log.info "-------------------Process Terminated! πŸ‘‹-------------------"
log.info "-------------------Process Terminated-------------------"
log.info process.toString()
putRecordToObserverStream(ProcessStatus.TERMINATED, process.name)
}
Expand All @@ -98,7 +99,7 @@ class PollyObserver implements TraceObserver {
*/
@Override
void onProcessPending(TaskHandler handler, TraceRecord trace){
log.info "------Process Pending! πŸ‘‹----------"
log.info "------Process Pending----------"
log.info handler.toString()
log.info trace.toString()
putRecordToObserverStream(ProcessStatus.PENDING, handler.task.getName())
Expand All @@ -114,7 +115,7 @@ class PollyObserver implements TraceObserver {
*/
@Override
void onProcessSubmit(TaskHandler handler, TraceRecord trace){
log.info "------Process Submitted! πŸ‘‹----------"
log.info "------Process Submitted----------"
log.info handler.toString()
log.info trace.toString()
putRecordToObserverStream(ProcessStatus.SUBMITTED, handler.task.getName())
Expand All @@ -130,7 +131,7 @@ class PollyObserver implements TraceObserver {
*/
@Override
void onProcessStart(TaskHandler handler, TraceRecord trace){
log.info "------Process Started! πŸ‘‹----------"
log.info "------Process Started----------"
log.info handler.toString()
log.info trace.toString()
putRecordToObserverStream(ProcessStatus.STARTED, handler.task.getName())
Expand All @@ -146,7 +147,7 @@ class PollyObserver implements TraceObserver {
*/
@Override
void onProcessComplete(TaskHandler handler, TraceRecord trace){
log.info "------Process Completed! πŸ‘‹----------"
log.info "------Process Completed----------"
log.info handler.toString()
log.info trace.toString()
putRecordToObserverStream(ProcessStatus.COMPLETED, handler.task.getName())
Expand All @@ -164,7 +165,7 @@ class PollyObserver implements TraceObserver {
*/
@Override
void onProcessCached(TaskHandler handler, TraceRecord trace){
log.info "------Process Cached! πŸ‘‹----------"
log.info "------Process Cached----------"
log.info handler.toString()
log.info trace.toString()
putRecordToObserverStream(ProcessStatus.CACHED, handler.task.getName())
Expand Down

0 comments on commit bec4c74

Please sign in to comment.