Skip to content

Accessing q:Q object in a wave app on startup #1777

Answered by mturoci
n-srinidhi asked this question in Q&A
Discussion options

You must be logged in to vote

The q object is only accesible when the client (browser) is connected - sends data to Wave app server. on_startup is a hook for when the Wave app server is booted up (no client connected yet).

Your 2 options in this case are:

  • Start the background job in app/client init within the serve function.
  • Start the background job in the on startup and pass the q object for subsequent updates afterwards - slightly more complex.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by n-srinidhi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants