Skip to content
This repository was archived by the owner on Nov 9, 2020. It is now read-only.

Commit a1cfcdd

Browse files
committed
Restructure readme
1 parent 85e219b commit a1cfcdd

File tree

1 file changed

+33
-33
lines changed

1 file changed

+33
-33
lines changed

README.md

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -18,45 +18,13 @@ The service provider is auto-discovered by Laravel.
1818

1919
Add `$app->register(Biigle\RemoteQueue\RemoteQueueServiceProvider::class);` to `bootstrap/app.php`.
2020

21-
## Configuration
22-
23-
You can override any of these configuration options of the `remote-queue` config either directly or via environment variables:
24-
25-
### remote-queue.listen
26-
27-
Default: `false`
28-
Environment: `REMOTE_QUEUE_LISTEN`
29-
30-
Accept and process jobs sent to this application instance.
31-
32-
### remote-queue.endpoint
33-
34-
Default: `api/v1/remote-queue`
35-
Environment: `REMOTE_QUEUE_ENDPOINT`
36-
37-
API endpoint to receive new jobs.
38-
39-
### remote-queue.connection
40-
41-
Default: `null`
42-
Environment: `REMOTE_QUEUE_CONNECTION`
43-
44-
Use this queue connection to process received jobs. If `null`, the default connection is used.
45-
46-
### remote-queue.accept-tokens
47-
48-
Default: `[]`
49-
Environment: `REMOTE_QUEUE_ACCEPT_TOKENS`
50-
51-
Accept jobs only if they provide one of these tokens. Specify tokens as comma separated list if you use the environment variable. One way to generate tokens is this command: `head -c 32 /dev/urandom | base64`.
52-
5321
## Usage
5422

5523
This package can be used to submit queued jobs to another Laravel or Lumen application, receive jobs from another application or both.
5624

5725
### Receive jobs
5826

59-
By default, this package does not allow receiving of jobs from another application. To allow this, set the `remote-queue.listen` config to `true`. Tokens are used to authenticate incoming requests. A token is just some long random string in this case. Configure `remote-queue.accept-tokens` with all tokens that are accepted. All received jobs which are successfully authenticated are pushed to a "regular" queue of this application and processed by the queue worker.
27+
By default, this package does not allow receiving of jobs from another application. To allow this, set the `remote-queue.listen` configuration to `true`. Tokens are used to authenticate incoming requests. A token is just some long random string in this case. Configure `remote-queue.accept-tokens` with all tokens that are accepted. All received jobs which are successfully authenticated are pushed to a "regular" queue of this application and processed by the queue worker.
6028

6129
**Important:** Make sure that the job class exists in both the submitting and receiving application.
6230

@@ -91,3 +59,35 @@ MyJob::dispatch($data)->onConnection('remote');
9159
We developed this package to be able to process jobs on a remote machine with GPU. To return the computed results, we applied what we call the "submit/response" pattern.
9260

9361
In this pattern, this package is installed on both Laravel/Lumen instances (let's call them A and B). In instance A, the remote queue is configured to push jobs to instance B (the one with the GPU). In instance B, the remote queue is configured to push jobs to instance A. New GPU jobs are submitted from instance A to the remote queue on instance B. Once the results are computed, they are returned as a "response job" to the remote queue on instance A where the results can be further processed.
62+
63+
## Configuration
64+
65+
You can override any of these configuration options of the `remote-queue` config either directly or via environment variables:
66+
67+
### remote-queue.listen
68+
69+
Default: `false`
70+
Environment: `REMOTE_QUEUE_LISTEN`
71+
72+
Accept and process jobs sent to this application instance.
73+
74+
### remote-queue.endpoint
75+
76+
Default: `api/v1/remote-queue`
77+
Environment: `REMOTE_QUEUE_ENDPOINT`
78+
79+
API endpoint to receive new jobs.
80+
81+
### remote-queue.connection
82+
83+
Default: `null`
84+
Environment: `REMOTE_QUEUE_CONNECTION`
85+
86+
Use this queue connection to process received jobs. If `null`, the default connection is used.
87+
88+
### remote-queue.accept-tokens
89+
90+
Default: `[]`
91+
Environment: `REMOTE_QUEUE_ACCEPT_TOKENS`
92+
93+
Accept jobs only if they provide one of these tokens. Specify tokens as comma separated list if you use the environment variable. One way to generate tokens is this command: `head -c 32 /dev/urandom | base64`.

0 commit comments

Comments
 (0)