From the course: AWS for Developers: SNS, SQS, and SWF

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

SWF workers in PHP

SWF workers in PHP - Amazon Web Services (AWS) Tutorial

From the course: AWS for Developers: SNS, SQS, and SWF

Start my 1-month free trial

SWF workers in PHP

- [Narrator] In the example files, copy up the three files for the three workers. The first worker is "CollectApplicationFeeWorker.php". The second worker is "CriminalHistoryCheckWorker.php". And the third worker is going to be "ReferenceCheckWorker.php". Open up the "CollectApplicationFeeWorker.php" file. This worker will run the method "pollForActivityTask", and ask SWF for any worker tasks in the "collectTheApplicationFee" task list. This will prevent our other two workers from pulling tasks that they aren't set up to handle. You can also have one single task list, and create the worker that looks at the activity type that's returned from SWF, and then passes the work to the correct worker, but that's up to you. Since SWF requires a fair amount of code to get up and running, I wanted to make the examples as simple as possible. Once the worker has pulled the task from the task list, it'll do the…

Contents