Skip to content

Instantly share code, notes, and snippets.

View duanejeffers's full-sized avatar

Duane Jeffers duanejeffers

View GitHub Profile
Verifying my Blockstack ID is secured with the address 15LzBLftyMJ76duN5wx1XfdEmckwT6rYZ5 https://explorer.blockstack.org/address/15LzBLftyMJ76duN5wx1XfdEmckwT6rYZ5
@duanejeffers
duanejeffers / keybase.md
Created September 1, 2017 03:35
Keybase Proof

Keybase proof

I hereby claim:

  • I am duanejeffers on github.
  • I am duanejeffers (https://keybase.io/duanejeffers) on keybase.
  • I have a public key ASBmdC7YOcv29Sear2jJJXm98JDVdgQ75dZwDHBa9Z9psQo

To claim this, I am signing this object:

@duanejeffers
duanejeffers / phalcon-queue-kick.md
Last active August 29, 2015 14:27
Kicking Queue Jobs with PhalconPHP

Kicking Queued Jobs with Phalcon

I'm working on a website that uses a telephony api to accept incoming text messages and phone calls, and inserts the data using Beanstalk and some workers. The biggest issue is using workers to work on fragments, so as to reduce the duplicate coding.

For example, I have a single Phone worker, that does all the work with a phone number (like validation, formatting, and then inserting or updating it in the database). I also have a workers for incoming text messages (SmsWorker) and phone calls (PhoneCallWorker), and they require data from the database table that the Phone worker primarily inserts in to. Since the primary workers (SmsWorker and PhoneCallWorker) are queuing work for the secondary worker (PhoneWorker), one of two things must happen to make them work together:

  1. Have the primary worker sleep until the job from the secondary worker is done.
  2. Have the primary worker queue the work for the secondary worker and bury it's job. The secondary worker then kicks the jo