Resolve "Job workers & persistence"
Related to #238
This is huge rewrite of our infrastructure into async job workers. I tried to make it as unobtrusive as possible. Basically you should just run the server as normal, then run the worker with something like:
cabal v2-run gargantext-cli -- worker run --name default
And remember to add this to .toml
:
[worker]
# After this number of seconds, the job will be available again.
# You can set timeout for each job individually and this is the
# preferred method over using defaultVt.
default_visibility_timeout = 1
# default delay before job is visible to the worker
default_delay = 0
[worker.database]
host = "127.0.0.1"
port = 5432
name = "pgmq"
user = "gargantua"
pass = "<pass>"
[[worker.definitions]]
name = "default"
queue = "default"
(it's in the .toml_toModify
anyways).