Skip to content

Commit

Permalink
Scheduling watch paths to run immediately
Browse files Browse the repository at this point in the history
  • Loading branch information
costrouc committed Aug 20, 2021
1 parent 9199fcb commit 63e7627
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions conda-store-server/conda_store_server/server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,5 +123,12 @@ def after_request_function(response):
app.conda_store.db, app.conda_store.store_directory
)
app.conda_store.ensure_conda_channels()
app.conda_store.session_factory.remove()

# schedule tasks
app.conda_store.celery_app

from conda_store_server.worker import tasks
(tasks.task_watch_paths.si()).apply_async()

app.run(debug=True, host=self.address, port=self.port)
2 changes: 2 additions & 0 deletions conda-store-server/conda_store_server/worker/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ def task_watch_paths():
worker.conda_store.register_environment(
specification=yaml.safe_load(f), namespace="filesystem"
)
import time
time.sleep(10)

worker.conda_store.session_factory.remove()

Expand Down
5 changes: 5 additions & 0 deletions tests/e2e/cypress/integration/main.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
describe('First Test', () => {
it('Check conda-store home page', () => {
// display home page without login
cy.visit('/conda-store/');

// visit login page
cy.visit('/conda-store/login/')

// click on sign in with jupyterhub
// login through jupyterhub oauth server
cy.get('#login > a')
.should('contain', 'Sign in with JupyterHub')
.click();

// fill in username and password and submit
cy.get('#username_input')
.type('conda-store-test');

Expand Down

0 comments on commit 63e7627

Please sign in to comment.