Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…upyter-plugin-fork into composer-api-changes
  • Loading branch information
Jeyaprakash-NK committed Dec 18, 2024
2 parents 3ff8e2e + 09e649a commit d96964c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ default_args = {
'retries': '{{retry_count}}',
'retry_delay': timedelta(minutes=int('{{retry_delay}}')),
'email': {{email}},
'email_on_failure': '{{email_failure}}',
'email_on_retry': '{{email_delay}}',
'email_on_success':'{{email_success}}'
'email_on_failure': {{email_failure}},
'email_on_retry': {{email_delay}},
'email_on_success': {{email_success}}
}

def write_output_to_file(run_id, **kwargs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ default_args = {
'retries': '{{retry_count}}',
'retry_delay': timedelta(minutes=int('{{retry_delay}}')),
'email': {{email}},
'email_on_failure': '{{email_failure}}',
'email_on_retry': '{{email_delay}}',
'email_on_success':'{{email_success}}'
'email_on_failure': {{email_failure}},
'email_on_retry': {{email_delay}},
'email_on_success': {{email_success}}
}

def write_output_to_file(run_id, **kwargs):
Expand Down
26 changes: 3 additions & 23 deletions src/controls/NotebookButtonExtension.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,28 +163,8 @@ class NotebookButtonExtensionPoint implements IDisposable {
* Fetch and update kernel status from the KernelAPI.
*/
private async fetchAndUpdateKernelStatus() {
try {
const currentKernelId = this.context.sessionContext.session?.kernel?.id;
if (!currentKernelId) {
this.setKernelStatus('Initializing', '#455A64');
return;
}

const runningKernels = await KernelAPI.listRunning();
const currentKernel = runningKernels.find(
kernel => kernel.id === currentKernelId
);

if (currentKernel) {
const kernelStatus = currentKernel?.execution_state ?? 'Unknown';
this.setKernelStatus(kernelStatus, this.getStatusColor(kernelStatus));
} else {
this.setKernelStatus('Failed', '#D93025');
}
} catch (error) {
console.error('Error fetching kernel status:', error);
this.setKernelStatus('Failed', '#D93025');
}
const kernelStatus = this.context.sessionContext.kernelDisplayStatus;
this.setKernelStatus(kernelStatus, this.getStatusColor(kernelStatus));
}

/**
Expand Down Expand Up @@ -241,7 +221,7 @@ class NotebookButtonExtensionPoint implements IDisposable {
return ' #455A64';
case 'restarting':
return '#9747FF';
case 'Unknown':
case 'unknown':
return '#C9C9C9';
default:
return '#FF9800';
Expand Down

0 comments on commit d96964c

Please sign in to comment.