You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 9, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+33-33Lines changed: 33 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -18,45 +18,13 @@ The service provider is auto-discovered by Laravel.
18
18
19
19
Add `$app->register(Biigle\RemoteQueue\RemoteQueueServiceProvider::class);` to `bootstrap/app.php`.
20
20
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
-
53
21
## Usage
54
22
55
23
This package can be used to submit queued jobs to another Laravel or Lumen application, receive jobs from another application or both.
56
24
57
25
### Receive jobs
58
26
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.
60
28
61
29
**Important:** Make sure that the job class exists in both the submitting and receiving application.
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.
92
60
93
61
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