Skip to content

Show queue times #6

@nathan-osman

Description

@nathan-osman

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions