Not sure how to work with beanstalkd module I am looking to setup a queue system to upload large files (~150MB). For specific reasons we decided to do this using SFTP (phpseclib). After some research I came to the conclusion that I would probably need something like a work queue. I decided to go with Beanstalkd since there was a drupal module for it.

I have managed to get a Beanstalkd server running and add items to the queue.
But now I'm kind of confused as to how I would need to execute a specific script.

Can anyone help with this particular part of getting beanstalkd queue items to run in a non-blocking way?

Do I need to maybe write a shell script to run a php cli or am I looking at it all wrong?
I managed to figure it out.

Using hook_cron_queue_info, it is possible to define worker callbacks for queue items.

I then wrote the sftp upload script in the worker callback and then run the runqueue.sh script that comes with the drupal beanstalkd module to listen for ready queue items.