Skip to content

Instantly share code, notes, and snippets.

@nycdavid
Last active October 25, 2017 15:36
Show Gist options
  • Save nycdavid/5066cd4eaf95b7c72a22c7f32b98cb32 to your computer and use it in GitHub Desktop.
Save nycdavid/5066cd4eaf95b7c72a22c7f32b98cb32 to your computer and use it in GitHub Desktop.
Grokking Faktory
  • 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
    
  2. 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
    
  3. Open localhost:7420 and see that your job has been enqueued with Faktory.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment