ajvb / kala

Modern Job Scheduler
MIT License
2.11k stars 187 forks source link

Fix postgres persistence and upgrade bolt library #248

Closed josejuanmontiel closed 2 years ago

josejuanmontiel commented 3 years ago

Hi, first thanks for developing and sharing this project.

We are using with postgres 10.6, and we notice some problems

If i have more time, i'll make another PR with https://github.com/ory/dockertest for testing.

Thanks again

josejuanmontiel commented 2 years ago

Hi, i get time for this... the error where

&pq.Error{Severity:"ERROR", Code:"22P02", Message:"invalid input syntax for type json", Detail:"Token \"0ce70361\" is invalid.", Hint:"", Position:"", InternalPosition:"", InternalQuery:"", Where:"JSON data, line 1: 0ce70361...", Schema:"", Table:"", Column:"", DataTypeName:"", Constraint:"", File:"json.c", Line:"1248", Routine:"report_invalid_token"} i upload the integration test (flaged with integration) job/storage/postgres/postgres_int_test.go

josejuanmontiel commented 2 years ago

In addition... i'll use this branch to include job InitDelayDuration in GetAll, because without this... when kala restart with postgres persistence, jobs doesn't start... which doesn't happen in mysql (code copied and refactor for json table)

josejuanmontiel commented 2 years ago

Seem that when the test works again in circleci https://issueexplorer.com/issue/hashicorp/raft-boltdb/21 this library is a bit older... upgrade library boltdb/bolt with go.etcd.io/bbolt

josejuanmontiel commented 2 years ago

@tooolbox or @ajvb now all green :) https://app.circleci.com/pipelines/github/ajvb/kala/97/workflows/f37a0256-1ee3-48a9-baf1-aafb2bc8ae9f/jobs/509