Commit f349ba45 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[TESTED] Worker Tested and README info to create the database, launching and...

[TESTED] Worker Tested and README info to create the database, launching and configuring it. Thank your Przemysław for this nice upgrade.
parent 917e622b
...@@ -396,6 +396,20 @@ cabal v2-test garg-test-tasty --test-show-details=streaming --flags 'test-crypto ...@@ -396,6 +396,20 @@ cabal v2-test garg-test-tasty --test-show-details=streaming --flags 'test-crypto
# Async workers <a name="async-workers"></a> # Async workers <a name="async-workers"></a>
## Steps to configure the worker
1. First create our Worker
```bash
createdb gargantext_pgmq
psql -c "ALTER DATABASE \"gargantext_pgmq\" OWNER TO \"gargantua\""
```
2. Then configure you gargantext-settings.toml (see next section)
3. Finally launch the worker
```bash
nix-shell --run "cabal v2-run gargantext-cli -- worker run --name default"
```
## Configuration ## Configuration
Edit your `gargantext-settings.toml` file and add this section: Edit your `gargantext-settings.toml` file and add this section:
......
#!/bin/bash #!/bin/bash
tmux new -d -s gargantext './server' \; \ tmux new -d -s gargantext './bin/scripts/server' \; \
split-window -h -d 'cd ./purescript-gargantext ; ./server' \; \ split-window -h -d 'cd ./purescript-gargantext ; ./server' \; \
select-pane -t 1 \; \ select-pane -t 1 \; \
split-window -d 'cd devops/docker/nlp/stanford/ ; docker-compose up' \; \ split-window -d 'cd devops/docker/nlp/stanford/ ; docker-compose up' \; \
split-window -d 'cd deps/nlp/spacy-server ; docker-compose up' \; \ split-window -d 'cd deps/nlp/spacy-server ; docker-compose up' \; \
split-window -d './bin/scripts/start-worker' \; \
#!/bin/bash
# Create the database for the worker using PostgreSQL first:
# sudo su postgres
# createdb -p 5433 gargantext_pgmq
# psql -p 5433 -c "alter database \"gargantext_pgmq\" owner to \"gargantua\""
# Then launch the service
nix-shell --run "cabal v2-run gargantext-cli -- worker run --name default"
...@@ -2,4 +2,6 @@ ...@@ -2,4 +2,6 @@
figlet "GarganText" figlet "GarganText"
./bin/gargantext_stop; ./bin/gargantext_tmux && tmux a -t gargantext ; ./bin/gargantext_stop ./bin/scripts/gargantext_stop
./bin/scripts/gargantext_tmux && tmux a -t gargantext
./bin/scripts/gargantext_stop
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment