Skip to content

Improve task queue performance#811

Merged
bennybp merged 1 commit into
mainfrom
task_queue
Apr 4, 2024
Merged

Improve task queue performance#811
bennybp merged 1 commit into
mainfrom
task_queue

Conversation

@bennybp
Copy link
Copy Markdown
Contributor

@bennybp bennybp commented Apr 4, 2024

Description

Simplifies the task queue. Now, the queue will store a timestamp used to sort tasks. By default, it is the time the row is added, however services will overwrite this with the created_on time of the service itself. This allows for services to finish relatively in order, without waiting for tasks from all other services to finish.

This behavior was already present, however the query to determine the next tasks was pretty gnarly and expensive. This is now replaced by a very simple, indexed query on one table.

Supersedes #810

Changelog description

Improves task queue performance

Status

  • Code base linted
  • Ready to go

@bennybp bennybp mentioned this pull request Apr 4, 2024
2 tasks
@bennybp bennybp force-pushed the task_queue branch 2 times, most recently from e0e0646 to e7036e0 Compare April 4, 2024 17:49
@bennybp bennybp merged commit 8981874 into main Apr 4, 2024
@bennybp bennybp deleted the task_queue branch April 5, 2024 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant