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

Show queue times #6

Open
nathan-osman opened this issue Oct 4, 2016 · 0 comments
Open

Show queue times #6

nathan-osman opened this issue Oct 4, 2016 · 0 comments

Comments

@nathan-osman
Copy link
Collaborator

nathan-osman commented Oct 4, 2016

There needs to be a label next to queued items showing the estimated time when they will be tweeted.

What This Involves

The www/templates/queue.html template controls what is displayed on the queue page. Right above the <div class="media"> block, there should be a line that states something to the effect of "queued for tweeting in xxx minutes / hours / whatever".

To calculate this, you will need to know two things:

  • the current tweet interval (which can be accessed in a request handler by s.queue.Settings().QueueFrequency)
  • the time of last tweet (s.queue.LastTweet(), which returns a time.Time)

The handler for the queue page is queueHandler() in server/queue.go. The app uses pongo2 for templates and it may be easiest to create a template filter / tag that adds a time.Time and time.Duration together.

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