Skip to content

Instantly share code, notes, and snippets.

@nycdavid
Last active October 25, 2017 15:36
Show Gist options
  • Select an option

  • Save nycdavid/5066cd4eaf95b7c72a22c7f32b98cb32 to your computer and use it in GitHub Desktop.

Select an option

Save nycdavid/5066cd4eaf95b7c72a22c7f32b98cb32 to your computer and use it in GitHub Desktop.

Revisions

  1. David Ko revised this gist Oct 25, 2017. 1 changed file with 15 additions and 1 deletion.
    16 changes: 15 additions & 1 deletion info.MD
    Original file line number Diff line number Diff line change
    @@ -1 +1,15 @@
    * Getting a CLI Shell to talk to the Faktory job server: `cat <(echo "HELLO {\"wid\":\"4qpc2443vpvai\", \"labels\": [\"golang\"]}") - | nc localhost 7419`
    * Getting a CLI Shell to talk to the Faktory job server: `cat <(echo "HELLO {\"wid\":\"4qpc2443vpvai\", \"labels\": [\"golang\"]}") - | nc localhost 7419`

    ### Enqueuing a test job from command line:
    1. First, open a persistent connection via Netcat to the Faktory job server:
    ```
    $> cat <(echo "HELLO {\"wid\":\"4qpc2443vpvai\", \"labels\": [\"golang\"]}") - | nc localhost 7419
    #=> +HI {"v":"1"}
    #=> +OK
    ```
    1. Then, __PUSH__ a job to the end of the queue, with at least the minimum parameters of `jid`, `jobtype`, `args`:
    ```
    $> PUSH { "jid": "123861239abnadsa", "jobtype": "TestJob", "args": ["hello"]}
    #=> +OK
    ```
    1. Open `localhost:7420` and see that your job has been enqueued with Faktory.
  2. David Ko created this gist Oct 25, 2017.
    1 change: 1 addition & 0 deletions info.MD
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    * Getting a CLI Shell to talk to the Faktory job server: `cat <(echo "HELLO {\"wid\":\"4qpc2443vpvai\", \"labels\": [\"golang\"]}") - | nc localhost 7419`