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

get current token and the next 2 tokens in join activity #14

Open
vaibhavchellani opened this issue Oct 12, 2017 · 21 comments
Open

get current token and the next 2 tokens in join activity #14

vaibhavchellani opened this issue Oct 12, 2017 · 21 comments

Comments

@vaibhavchellani
Copy link

get current token and the next 2 tokens in join activity for the selected queue from the database

@vaibhavchellani
Copy link
Author

@Jasmeet1709 can you do this ?
let me know asap so that i can assign this to you

@Jasmeet1709
Copy link

@vaibhavchellani yup I will do it by tomorrow sorry for late

@Jasmeet1709
Copy link

@vaibhavchellani is authentication part is done or I will do it temporary for token purpose if it is already done then please ignore it

@vaibhavchellani
Copy link
Author

vaibhavchellani commented Oct 15, 2017

@Jasmeet1709 we dont need auth to be working as of now , we already have token system working you just need to fetch tokens from DB for this issue .

@Jasmeet1709
Copy link

@vaibhavchellani okay

@vaibhavchellani
Copy link
Author

@Jasmeet1709 let me know of you have any doubts regarding this or anything else on the slack group

@vaibhavchellani
Copy link
Author

@Jasmeet1709 updates ?

@Jasmeet1709
Copy link

@vaibhavchellani just give me time for today as I am busy in another work

@Jasmeet1709
Copy link

@vaibhavchellani Is latest token in db is a current token

@Jasmeet1709
Copy link

@vaibhavchellani or it is queue status(Current token)

@vaibhavchellani
Copy link
Author

@Jasmeet1709 the latest token is the latest token given to a user aka the newest token , the queue status field depicts the status of queue ie active or inactive
Lets discuss on how you plan to get the current token , that flow has yet to be worked on .
Please suggest a way you think that should be done
Ill share what i think about that after you do .

@Jasmeet1709
Copy link

@vaibhavchellani if no_of_tokens is a total token then current token will be no_of_tokens - no_of_users having queue status 1 i.e active

@vaibhavchellani
Copy link
Author

@Jasmeet1709 current token is the first token in the queue at that instant , its not equal to no_of_tokens - no_of_users . queue status depicts if the whole queue is active or not ,it tells nothing about a particular user

@Jasmeet1709
Copy link

@vaibhavchellani bro sorry token status of a user instead of queue status

@Jasmeet1709
Copy link

@vaibhavchellani and I think latest token is the no of total tokens in the queue

@vaibhavchellani
Copy link
Author

@Jasmeet1709 i think it would be hard to traverse each user and check if they are active and not , i think a better way would be to have a child called "current_index" under queue node , where we can store the index of current token from the beginning , then we can directly go to that index number in the queue to do further operations . Let me know if you find this approach doable .

@Jasmeet1709
Copy link

@vaibhavchellani it is also fine or even better I am just suggesting solution from the given structure

@vaibhavchellani
Copy link
Author

@Jasmeet1709 okay , lets get this done then !

@Jasmeet1709
Copy link

@vaibhavchellani done man check it out by doing queue first id current token = 0
and start the app

@vaibhavchellani
Copy link
Author

@Jasmeet1709 please reference the issue in the comment while making a PR .

@Jasmeet1709
Copy link

@vaibhavchellani yeah I forgot to add

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

2 participants