Reputation: 31
How do I test an IronWorker task locally using the CLI?
Upvotes: 3
Views: 399
Reputation: 667
Assuming you have Docker installed you can also run your worker locally using a Docker command:
$ docker run --rm -v "$(pwd)":/worker -w /worker iron/php sh -c 'php name_of_worker.php'
Just make sure your Docker Quickstart Terminal is up and running.
If it works on Docker then it will work on IronIO. As stated in the Iron docs here.
Upvotes: 0
Reputation: 1365
iron_worker run worker_name -p '{"foo":"bar","baz":[1,2,3]}'
where optional "-p" flag - payload
Upvotes: 4