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

cancel run does not work anymore #437

Closed
brianlball opened this issue Nov 13, 2018 · 5 comments
Closed

cancel run does not work anymore #437

brianlball opened this issue Nov 13, 2018 · 5 comments
Assignees
Labels

Comments

@brianlball
Copy link
Contributor

run any of the SEB examples and try and cancel the run.

@nllong
Copy link
Member

nllong commented Dec 12, 2018

PAT: 2.7.1
OpenStudio Server: 2.7.1

The status gets set to Complete almost immediately, but the set of simulations that are queued are left in the queue to finish. Do you expect that all the queued simulations disappear upon clicking "cancel"?

image

@anyaelena anyaelena assigned anyaelena and unassigned nllong Jan 17, 2019
@anyaelena
Copy link
Member

working on two things:

  1. Reviewing implications of introducing "pending cancellation" and "cancelled" statuses for analyses.
  2. Deletion of all queued simulations when analysis in cancelled. Note that these do clear out quickly by failing with a undefined method status=' for nil:NilClass` error once the analysis has been cancelled. Not ideal but at least the workers do free up.

@anyaelena
Copy link
Member

anyaelena commented Feb 14, 2019

regarding queued datapoints not being removed, this should be ResqueJobs::RunSimulateDataPoint. I'll try to write a test for removing queued simulations and open PR.

@anyaelena
Copy link
Member

ok. Running the "SEB_calibration_RepeatRun_2013" sample project from PAT against a locally deployed instance, canceling the run from PAT has no effect. The RunAnalysis Resque job remains active and datapoints keep running and completing.

@anyaelena
Copy link
Member

anyaelena commented Feb 20, 2019

I'm fairly sure that the issue is this:

  1. we only clean up "queued" datapoints when the analysis is canceled: https://github.com/NREL/OpenStudio-server/blob/develop/server/app/models/analysis.rb#L172
  2. the status is set to queued in the initialize block for the delayed jobs job,
  3. which is called immediately before perform when we are using resque for queue management

So the datapoints that are queued w/Resque actually have status "na" and are being ignored when the analysis is canceled. I'm thinking through the cleanest fix to recommend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants