I have a PHP script that writes a file to an Azure Blob. Once the file is uploaded, logic in Azure performs computation and then places the result in the Blob. Upon completion, a message is PUT into an Azure Queue.
I'm trying to write code in php that polls the Queue, looking for a specific message indicating that the Result is ready to download. How would you approach this?
The only feasible way of doing that with PHP that I see following as possible solution to your issue:
Hope this helps!
Add comment if you need any additional help, and I'll try to provide code samples. Everything is pretty trivial.
As far as I know, LAMP stnads for Linux, MySQL, Apache, PHP. Currently it is not possible to have Linux running in an Windows Azure.
But if you are not talking about Windows Azure Compute where to run your PHP and just Linux.It is even easier and exactly the same. The only difference is that you have to use cron (or here ) or at , to schedule execution of your php script.
In Linux you can even make your php script executable by adding a special processor command on the first line . You should place something like:
#!/path/to/your/php/binary/php
on the first line of your php script that processes the queue.
This is a sample configuration line for the crontab to execute your script every 2 minutes:
*/2 * * * * /path/to/your/php/script/process_queue.php
Taken from here .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.