README.md:
The Parse Cloud Code job queue. Define, queue, and process work on a constant basis.
First, you'll want to define some jobs:
| /** | |
| * VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units | |
| * | |
| * To overcome this, create media queries that target the width, height, and orientation of iOS devices. | |
| * It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing | |
| * the height of element `.foo` —which is a full width and height cover image. | |
| * | |
| * iOS Resolution Quick Reference: http://www.iosres.com/ | |
| */ | |
| UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
| UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl'); | |
| UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl'); | |
| UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl'); |
| // The before save handler will pass information to the after save handler to disable the | |
| // after save handler from creating a loop. | |
| // It also prevents client side code from triggering the silent change, by using a different flag | |
| // that the client should never see. | |
| // It should only be visible in the data browser, won't be sent to a client in an undefined state. | |
| Parse.Cloud.beforeSave('TestObject', function(request, response) { | |
| handleComingFromTask(request.object); | |
| response.success(); | |
| }); |