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

Data persistence between requests #7

Closed
8 tasks done
BenjamenMeyer opened this issue May 29, 2016 · 2 comments
Closed
8 tasks done

Data persistence between requests #7

BenjamenMeyer opened this issue May 29, 2016 · 2 comments

Comments

@BenjamenMeyer
Copy link
Member

BenjamenMeyer commented May 29, 2016

StackInABox is designed to only last for the length of a test. Loaded into StackInAWSGI that likely means that the data in a normal StackInABox model would be destroyed between requests or at a minimum not reliably retrieved. To handle this StackInAWSGI needs to be able to have a type of session that can be created using the admin functionality. The session maintains the StackInABox services for itself, and should keep all the data alive until the session is closed.

Note: Normally the session is the thread in a normal unit test scenario. Here we need to make it part of the WSGI scenario.

  • Session to manage a StackInABox instance
    • create a Session object to manage sessions
    • create a session
    • remove a session
    • keep the session alive between WSGI requests
  • Ability to create a StackInABox instance from scratch when creating a session
    • instantiate a session-specific StackInABox instance
    • instantiate the various StackInABoxServices for the session
@BenjamenMeyer
Copy link
Member Author

PR #9 does most of this, but we need to confirm that the sessions remain alive between WSGI requests.

@BenjamenMeyer
Copy link
Member Author

Data remains alive between calls and sessions are persistent but limited to supporting a single worker. Issue #15 is tracking that last bit.

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

1 participant