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

notebook -- Get rid of the stupid "unable to immediately interrupt computation" alert that drives me nuts #5712

Closed
williamstein opened this issue Apr 8, 2009 · 25 comments

Comments

@williamstein
Copy link
Contributor

More precisely, one could keep the alert, but make it so that it can not appear if it already appeared in the last 5 seconds (say). It is so annoying!

CC: @sagetrac-acleone @williamstein @boothby @qed777

Component: notebook

Author: Tim Dumol, Mitesh Patel

Reviewer: Mitesh Patel, Tim Dumol, Alex Leone

Merged: sagenb-0.8

Issue created by migration from https://trac.sagemath.org/ticket/5712

@boothby
Copy link

boothby commented Apr 8, 2009

comment:1

The "2.0" thing to do is to inject a div somewhere, and just keep sending interrupts to the server until it works or the interrupt process gets cancelled.

"Couldn't immediately interrupt. Trying again in (seconds 'till next retry) [cancel] [restart worksheet]"

[x] <- is a button that says x.

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Apr 9, 2009

comment:2

Is this a high priority issue? I am not convinced and since there is no patch and no sign of anyone working on fixing this I am bumping this to 3.4.2.

Cheers,

Michael

@sagetrac-mabshoff sagetrac-mabshoff mannequin modified the milestones: sage-3.4.1, sage-3.4.2 Apr 9, 2009
@TimDumol
Copy link
Mannequin

TimDumol mannequin commented Jan 18, 2010

Attachment: trac_5712-interrupt-notification.patch.gz

Uses Achtung (jQuery library) for notifications instead.

@TimDumol
Copy link
Mannequin

TimDumol mannequin commented Jan 18, 2010

Author: Tim Dumol

@TimDumol
Copy link
Mannequin

TimDumol mannequin commented Jan 18, 2010

comment:3

This should do the thing.

@TimDumol TimDumol mannequin added the s: needs review label Jan 18, 2010
@TimDumol
Copy link
Mannequin

TimDumol mannequin commented Jan 18, 2010

Fixes #7702 and a typo in notebook_lib.js from the previous patch. Apply this patch alone.

@TimDumol
Copy link
Mannequin

TimDumol mannequin commented Jan 18, 2010

comment:4

Attachment: trac_5712-interrupt-notification.2.patch.gz

@TimDumol
Copy link
Mannequin

TimDumol mannequin commented Jan 18, 2010

comment:5

To note, the patch series for this is:

trac_7650-sagenb_doctesting_v6.patch
trac_7650-reviewer.patch
trac_7648-missing_indent.patch
trac_7663-rstrip_prompt.patch
trac_7847-empty-trash-no-referer.patch
trac_7786-template-jinja-idiomatic.patch
trac_7863-declare_vars_aux_js_v2.patch
trac_7874-typeset_interact_labels.patch
trac_7858-key_binding_vars_v2.patch
trac_7666-alphanumeric_cell_ids_B5.patch
trac_7666-reviewer.patch
trac_7835-preparsing-unicode_v2.patch
trac_7249_jinja2_v5.patch
trac_2779-sagenb-error-message.patch
2779_2_banner.patch
trac_3154-spurious-u0027-output.patch
trac_7969-escaped-backslash.patch
trac_7937-sass_manifest.patch
trac_4217-html-system-formatting.patch
trac_3083-print-documentation.patch
trac_7962-link-worksheets-zip-file.patch
trac_5177-delete-cell-dirs.patch
trac_5712-interrupt-notification.patch

@qed777
Copy link
Mannequin

qed777 mannequin commented Jan 20, 2010

comment:7
  • I get a doctest failure from Worksheet.interrupt.

    • Just to check: Is _ui-achtung.sass just ui.achtung.css run through css2sass? I suggest describing the conversion method briefly in sass/readme.txt.

    • Interrupting an idle worksheet also brings up the alert.

    • V2 does not fix Handle interrupts better in the notebook #7702's example (interrupt test.sws). A new alert appears every time I try to interrupt the calculation, but the calculation keeps going (e.g., according to top). (I stopped after about 10 attempts.) Restarting the worksheet does stop the calculation. But this need not hold up this ticket, as I can interrupt other examples, such as import time; time.sleep(10) and factor(factorial(100000000)).

    • When we do show the alert (with Handle interrupts better in the notebook #7702's example or a different one), maybe we should add, e.g., "Please try again in a few seconds. If that doesn't work, please try restarting the worksheet."?

@TimDumol
Copy link
Mannequin

TimDumol mannequin commented Jan 20, 2010

comment:8

Replying to @qed777:

  • I get a doctest failure from Worksheet.interrupt.

  • Just to check: Is _ui-achtung.sass just ui.achtung.css run through css2sass? I suggest describing the conversion method briefly in sass/readme.txt.

Yes. Sure, I'll do so.

  • Interrupting an idle worksheet also brings up the alert.

Good catch.

  • V2 does not fix Handle interrupts better in the notebook #7702's example (interrupt test.sws). A new alert appears every time I try to interrupt the calculation, but the calculation keeps going (e.g., according to top). (I stopped after about 10 attempts.) Restarting the worksheet does stop the calculation. But this need not hold up this ticket, as I can interrupt other examples, such as import time; time.sleep(10) and factor(factorial(100000000)).

The point of #7702 is not to interrupt uninterruptible calculations, but to recognize that a calculation cannot be interrupted and display an appropriate alert.

  • When we do show the alert (with Handle interrupts better in the notebook #7702's example or a different one), maybe we should add, e.g., "Please try again in a few seconds. If that doesn't work, please try restarting the worksheet."?

@TimDumol
Copy link
Mannequin

TimDumol mannequin commented Jan 20, 2010

Reviewer: Mitesh Patel

@TimDumol
Copy link
Mannequin

TimDumol mannequin commented Jan 20, 2010

comment:9

Replying to @TimDumol:

Replying to @qed777:

  • I get a doctest failure from Worksheet.interrupt.

  • Just to check: Is _ui-achtung.sass just ui.achtung.css run through css2sass? I suggest describing the conversion method briefly in sass/readme.txt.

Yes. Sure, I'll do so.

In another ticket, that is.

  • Interrupting an idle worksheet also brings up the alert.

Good catch.

  • V2 does not fix Handle interrupts better in the notebook #7702's example (interrupt test.sws). A new alert appears every time I try to interrupt the calculation, but the calculation keeps going (e.g., according to top). (I stopped after about 10 attempts.) Restarting the worksheet does stop the calculation. But this need not hold up this ticket, as I can interrupt other examples, such as import time; time.sleep(10) and factor(factorial(100000000)).

The point of #7702 is not to interrupt uninterruptible calculations, but to recognize that a calculation cannot be interrupted and display an appropriate alert.

  • When we do show the alert (with Handle interrupts better in the notebook #7702's example or a different one), maybe we should add, e.g., "Please try again in a few seconds. If that doesn't work, please try restarting the worksheet."?

Will do so.

@TimDumol
Copy link
Mannequin

TimDumol mannequin commented Jan 20, 2010

comment:10

This patch should do it.

@TimDumol
Copy link
Mannequin

TimDumol mannequin commented Jan 20, 2010

Attachment: trac_5712-interrupt-notification.3.patch.gz

Adds the requested changes.

@qed777
Copy link
Mannequin

qed777 mannequin commented Jan 21, 2010

Attachment: trac_5712-interrupt-notification.4.patch.gz

See comment. Replaces previous.

@qed777
Copy link
Mannequin

qed777 mannequin commented Jan 22, 2010

Periodically re-attempt to interrupt. Replaces previous.

@qed777
Copy link
Mannequin

qed777 mannequin commented Jan 22, 2010

comment:11

Attachment: trac_5712-interrupt-notification.5.patch.gz

Please ignore V4. V5

  • Adds optional callbacks for the jQuery achtung plug-in's timeout and close events. See ui.achtung-mod.js. The notebook actually loads ui.achtung-mod.min.js, which I made with the YUI Compressor.

  • Uses the new callbacks to send additional interrupt requests and update an alert every 5 seconds, until a request succeeds or the user closes the alert. If the process is interrupted, or the user restarts it, or the computation is done, etc., the alert should close itself.

Please test (and post feedback)!

@qed777
Copy link
Mannequin

qed777 mannequin commented Jan 25, 2010

Rebased against SageNB 0.7 at #8051. Replaces previous.

@qed777
Copy link
Mannequin

qed777 mannequin commented Jan 25, 2010

comment:12

Attachment: trac_5712-interrupt-notification.6.patch.gz

V6 is rebased against #8051's SageNB 0.7.

@TimDumol
Copy link
Mannequin

TimDumol mannequin commented Mar 11, 2010

Changed author from Tim Dumol to Tim Dumol, Mitesh Patel

@TimDumol
Copy link
Mannequin

TimDumol mannequin commented Mar 11, 2010

comment:14

Works for me against 0.7.5.3. Can't see anything wrong with the changes. Positive review for your changes. Should we mark this positive review, or ask for a third party?

@TimDumol
Copy link
Mannequin

TimDumol mannequin commented Mar 11, 2010

Changed reviewer from Mitesh Patel to Mitesh Patel, Tim Dumol

@sagetrac-acleone
Copy link
Mannequin

sagetrac-acleone mannequin commented Mar 11, 2010

comment:15

LGTM.

@sagetrac-acleone
Copy link
Mannequin

sagetrac-acleone mannequin commented Mar 11, 2010

Changed reviewer from Mitesh Patel, Tim Dumol to Mitesh Patel, Tim Dumol, Alex Leone

@TimDumol
Copy link
Mannequin

TimDumol mannequin commented Apr 24, 2010

Merged: sagenb-0.8

@TimDumol TimDumol mannequin removed the s: positive review label May 4, 2010
@TimDumol TimDumol mannequin closed this as completed May 4, 2010
@TimDumol TimDumol mannequin mentioned this issue May 3, 2010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants