Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Releases: contiamo/go-base

Durable Tamarin

28 Sep 09:40
551a54e
Compare
Choose a tag to compare
Fix metrics in workers, make task worker more efficient (#62)

* Now worker (task/schedule) metrics are consistent with queue metrics
* Task worker now handles multiple tasks in one iteration before
  waiting for an interval
* Removed metrics which didn't make sense
* Fixed linter issues

Capable Tamarin

23 Sep 13:14
ee889de
Compare
Choose a tag to compare
Let customize the pagination bounds and default size (#61)

So, we can extend page size in certain situations.

Changed Tamarin

11 Sep 13:16
cbc72c3
Compare
Choose a tag to compare
Use INSERT ON CONFLICT for retention task upsert (#60)

* Use INSERT ON CONFLICT for retention task upsert

**What**
- When deploying some of the apps with the retention policy, we saw the
  startup get stuck during the retention task assertion. Moving a an
  INSERT ON CONFLICT upsert method avoids the table lock and has the
  same effect.
- Add a partial unique index to the schedules table that is required for
  the upsert flow
- Any project using the retention policies will need to add this
  migration to their startup

```sql
CREATE UNIQUE INDEX IF NOT EXISTS unique_retention_idx
ON schedules (task_queue, task_type, (task_spec->>'queueName'), (task_spec->>'taskType'), (task_spec->>'status'))
WHERE task_type = 'retention';
```

Signed-off-by: Lucas Roesler <[email protected]>

Boisterous Tamarin

09 Sep 11:50
ede17e2
Compare
Choose a tag to compare
Move the module to v2 (#59)

**What**
- The breaking API change in the queue rquires a major version bump

Signed-off-by: Lucas Roesler <[email protected]>

Accountable Tamarin

09 Sep 08:04
ede17e2
Compare
Choose a tag to compare
Move the module to v2 (#59)

**What**
- The breaking API change in the queue rquires a major version bump

Signed-off-by: Lucas Roesler <[email protected]>

Tragic Sawfish

03 Sep 14:23
7a4d4a3
Compare
Choose a tag to compare
Close heartbeats in dispatcher when unknown task type (#57)

This will unblock the queue in case the task type is not handled by anything.

Transparent Sawfish

03 Sep 13:04
ed88685
Compare
Choose a tag to compare
Extract the HTTP request task from Hub (#56)

* This also involves extracting the token creator from Hub
* Also, moved the retention and SQL jobs to `handlers` package
* Fixed a go routine leak in the HTTP task handler's code
* Use `time.Duration` for the duration and remove `Hub` from strings
* Allow variations of JSON content types
* Add test case that proves empty response works

Strict Sawfish

01 Sep 14:36
40308bb
Compare
Choose a tag to compare
Close heartbeats in the sql task handler (#55)

**What**
- Ensure that the task actually ends by closing the heartbeats channel.
  This was not seen during previous testing because the test code closed
  the channel. However, when deployed, the task never finished.

Signed-off-by: Lucas Roesler <[email protected]>

Scared Sawfish

01 Sep 11:16
ca6a1f6
Compare
Choose a tag to compare

ca6a1f6 : add Hash() and HashToString() function to the crypto package (#54) (by Tino Rusch)

Smooth Stegosaurus

01 Sep 09:58
efef3b1
Compare
Choose a tag to compare
Create task retention worker and scheduler (#53)

**What**
- Create new generic SQLTask spec and handler
- Create a new task handler that can be used to cleanup old tasks
  matching a specific filter. The caller can specify the queue, task
  type, status, age, and a custom sqlizer.
- Add utility to schedule this new cleanup task once per hour. The exact
  minute is chosen randomly as a basic attempt to spread our the
  workload.
- Improve the db test utility EqualCount to allow passing an error
  message and ars down to the require method inside of it. This allows
  the errors to be more expressive and hopefully easier to read
- Add new db setup utility that uses docker to ensure a db server is
  ready. This is intended as a dev mode only tool which is not left in
  the final committed code, but can be very useful to speedup test
  iteration and debugging.

Signed-off-by: Lucas Roesler <[email protected]>