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

Implement server & worker init & final scripts #248

Closed
rHorsey opened this issue Jan 4, 2018 · 9 comments
Closed

Implement server & worker init & final scripts #248

rHorsey opened this issue Jan 4, 2018 · 9 comments

Comments

@rHorsey
Copy link
Contributor

rHorsey commented Jan 4, 2018

From @asparke2 on May 11, 2017 16:5

Necessary for ResStock and ComStock

Copied from original issue: NREL/OpenStudio#2608

@rHorsey rHorsey self-assigned this Jan 4, 2018
@rHorsey
Copy link
Contributor Author

rHorsey commented Jan 4, 2018

Worker is implemented and tested. Server will get implemented next week.

@rHorsey
Copy link
Contributor Author

rHorsey commented Jan 4, 2018

@shorowit found a lovely bug with *.sh files coming from windows. This has been addressed using dos2unix in 7dc6836

@rHorsey
Copy link
Contributor Author

rHorsey commented Jan 4, 2018

Worker looks to be mostly stable. There are some paradoxes in when to apply worker finalization in the workflow, but otherwise the implementation appears solid.

@rHorsey
Copy link
Contributor Author

rHorsey commented Jan 4, 2018

Worker is being merged in. Sever remains to be done.

@rHorsey
Copy link
Contributor Author

rHorsey commented Jan 4, 2018

From @asparke2 on August 10, 2017 1:12

Sweet!

@rHorsey
Copy link
Contributor Author

rHorsey commented Feb 15, 2018

Defining server finalization as major, and server initialization as minor.

@anyaelena
Copy link
Member

Per Pivotal, it looks like this should be assigned to me. It would be helpful if I could get a concrete example of what we are trying to do. I discussed with @nllong running code on only the server docker container as part of the deployment process - presumably this is "initialization". Is "finalization" a final stage of setup or part of the destroy process for the server container? And are we only talking about Docker here?

@anyaelena
Copy link
Member

@nllong @rHorsey Notes from our call:

Analysis finalization should be triggered from web_background but run on web_1, which has superior resources and memory management.

Consider triggering this via a HTTP action for the analysis. Since this may take longer than a standard HTTP request and we don't want it to time out, we will still need the actual script(s) to run in the background on web_1, meaning that we need to use Resque on web_1.

So:

  1. Analysis completes
  2. background task calls http method on web
  3. web adds "run_finalization_scripts" to queue for background tasks that run on web.

Now we can all think what's wrong with this...

@anyaelena anyaelena self-assigned this Apr 18, 2018
@anyaelena
Copy link
Member

anyaelena commented Apr 25, 2018

I guess there is no reason for the http call since we are going to need to use background task queue regardless. So:

  1. Analysis completes
  2. web_background puts run_finalization_scripts in queue
  3. web_1 runs "run_finalization_scripts" in background

@nllong nllong assigned nllong and rHorsey and unassigned anyaelena Jul 24, 2018
@anyaelena anyaelena removed the P2 label Jul 26, 2018
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

3 participants