You'll see log messages about the 6 (first try + RETRY_LIMIT) attempts and the final error message. Let's look into the DB to find out what happened:

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2024-06-30 07:00:08

You'll see log messages about the 6 (first try + RETRY_LIMIT) attempts and the final error message. Let's look into the DB to find out what happened:

Essentially scheduling a task is done by inserting a corresponding row into the pg_task table. You can do in by hands from psql or code in any language.

All the communication is synchronized by the DB, so it doesn't matter how or how many workers you run. It could be a separate process as well as in-process [tokio::spawn].

The workers would wait until the current step of all the tasks is finished and then exit. You can wait for this by checking for the existence of running tasks:

Sometimes you need to delay the next step. Using [tokio::time::sleep] before returning the next step creates a couple of issues:

Leave a Comment