Not sure how to work with beanstalkd module
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.