Skip to content
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

brainlife/cli (waitForFinish) Only console output if the status changes #51

Open
soichih opened this issue Jun 29, 2022 · 0 comments
Open

Comments

@soichih
Copy link
Contributor

soichih commented Jun 29, 2022

This line outputs status output every few seconds

cli/util.js

Line 621 in a8c7987

if(verbose) console.debug(new Date, "task:", task._id, task.name, task.service, task.status, task.status_msg);

The output might show repeated messages if the status message doesn't change like this.

2022-06-29T10:16:44.283Z task: 62bc268bfd504b9f179f4a33 __dtv brainlife/validator-neuro-freesurfer requested Looking for resource
2022-06-29T10:16:47.604Z task: 62bc268bfd504b9f179f4a33 __dtv brainlife/validator-neuro-freesurfer requested Looking for resource
2022-06-29T10:16:50.925Z task: 62bc268bfd504b9f179f4a33 __dtv brainlife/validator-neuro-freesurfer running Service started
2022-06-29T10:16:54.250Z task: 62bc268bfd504b9f179f4a33 __dtv brainlife/validator-neuro-freesurfer running starting freesurfer validator
2022-06-29T10:16:57.577Z task: 62bc268bfd504b9f179f4a33 __dtv brainlife/validator-neuro-freesurfer running starting freesurfer validator
2022-06-29T10:17:00.897Z task: 62bc268bfd504b9f179f4a33 __dtv brainlife/validator-neuro-freesurfer running starting freesurfer validator
2022-06-29T10:17:04.214Z task: 62bc268bfd504b9f179f4a33 __dtv brainlife/validator-neuro-freesurfer running Copying blob sha256:99b4247d65e38cdec6b33ff5d55285b23f0e4e87954b10d43b5c1679176816c7
2022-06-29T10:17:07.532Z task: 62bc268bfd504b9f179f4a33 __dtv brainlife/validator-neuro-freesurfer running Copying blob sha256:99b4247d65e38cdec6b33ff5d55285b23f0e4e87954b10d43b5c1679176816c7
2022-06-29T10:17:10.848Z task: 62bc268bfd504b9f179f4a33 __dtv brainlife/validator-neuro-freesurfer running Copying blob sha256:99b4247d65e38cdec6b33ff5d55285b23f0e4e87954b10d43b5c1679176816c7
2022-06-29T10:17:14.166Z task: 62bc268bfd504b9f179f4a33 __dtv brainlife/validator-neuro-freesurfer running 2022/06/29 10:17:11  info unpack layer: sha256:5c939e3a4d1097af8d3292ad3a41d3caa846f6333b91f2dd22b972bc2d19c5b5
2022-06-29T10:17:17.484Z task: 62bc268bfd504b9f179f4a33 __dtv brainlife/validator-neuro-freesurfer running 2022/06/29 10:17:11  info unpack layer: sha256:5c939e3a4d1097af8d3292ad3a41d3caa846f6333b91f2dd22b972bc2d19c5b5
2022-06-29T10:17:20.808Z task: 62bc268bfd504b9f179f4a33 __dtv brainlife/validator-neuro-freesurfer running 2022/06/29 10:17:11  info unpack layer: sha256:5c939e3a4d1097af8d3292ad3a41d3caa846f6333b91f2dd22b972bc2d19c5b5
2022-06-29T10:17:24.138Z task: 62bc268bfd504b9f179f4a33 __dtv brainlife/validator-neuro-freesurfer running 2022/06/29 10:17:21  info unpack layer: sha256:837dfa68591bd98f2aeda64c539fbfc0ded37d2f24f52879ad2fc61e54d6ceeb
2022-06-29T10:17:27.465Z task: 62bc268bfd504b9f179f4a33 __dtv brainlife/validator-neuro-freesurfer running 2022/06/29 10:17:21  info unpack layer: sha256:837dfa68591bd98f2aeda64c539fbfc0ded37d2f24f52879ad2fc61e54d6ceeb
2022-06-29T10:17:30.781Z task: 62bc268bfd504b9f179f4a33 __dtv brainlife/validator-neuro-freesurfer running 2022/06/29 10:17:21  info unpack layer: sha256:837dfa68591bd98f2aeda64c539fbfc0ded37d2f24f52879ad2fc61e54d6ceeb
2022-06-29T10:17:34.097Z task: 62bc268bfd504b9f179f4a33 __dtv brainlife/validator-neuro-freesurfer running INFO:    Creating SIF file...
2022-06-29T10:17:37.418Z task: 62bc268bfd504b9f179f4a33 __dtv brainlife/validator-neuro-freesurfer running INFO:    Creating SIF file...
2022-06-29T10:17:40.740Z task: 62bc268bfd504b9f179f4a33 __dtv brainlife/validator-neuro-freesurfer running INFO:    Creating SIF file...

Instead, we should console output if status message changes. So the above output could look like this.

2022-06-29T10:16:44.283Z task: 62bc268bfd504b9f179f4a33 __dtv brainlife/validator-neuro-freesurfer requested Looking for resource
2022-06-29T10:16:50.925Z task: 62bc268bfd504b9f179f4a33 __dtv brainlife/validator-neuro-freesurfer running Service started
2022-06-29T10:16:54.250Z task: 62bc268bfd504b9f179f4a33 __dtv brainlife/validator-neuro-freesurfer running starting freesurfer validator
2022-06-29T10:17:04.214Z task: 62bc268bfd504b9f179f4a33 __dtv brainlife/validator-neuro-freesurfer running Copying blob sha256:99b4247d65e38cdec6b33ff5d55285b23f0e4e87954b10d43b5c1679176816c7
2022-06-29T10:17:14.166Z task: 62bc268bfd504b9f179f4a33 __dtv brainlife/validator-neuro-freesurfer running 2022/06/29 10:17:11  info unpack layer: sha256:5c939e3a4d1097af8d3292ad3a41d3caa846f6333b91f2dd22b972bc2d19c5b5
2022-06-29T10:17:34.097Z task: 62bc268bfd504b9f179f4a33 __dtv brainlife/validator-neuro-freesurfer running INFO:    Creating SIF file...
@soichih soichih changed the title (waitForFinish) Only console output if the status changes brainlife/cli (waitForFinish) Only console output if the status changes Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant