Skip to content

Conversation

montymxb
Copy link
Contributor

Adds support for starting and monitoring cloud jobs. Jobs are like cloud functions, but instead of waiting for completion you immediately receive the id for a status object. The job status can be retrieved to see whether a cloud job has completed running, it's final status and other information about the job.

// start a cloud job
$jobStatusId = ParseCloud::startJob('MyCloudJob', [
    'arg' => 'value'
]);

// get job status by the returned id
$jobStatus = ParseCloud::getJobStatus($jobStatusId);

// check the status, can be succeeded/running/failed/etc.
$status = $jobStatus->get('status');

Includes tests & README refs.

@montymxb montymxb added this to the 1.4.0 milestone Nov 13, 2017
@codecov
Copy link

codecov bot commented Nov 13, 2017

Codecov Report

Merging #373 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #373      +/-   ##
========================================
+ Coverage   98.99%    99%   +<.01%     
========================================
  Files          38     38              
  Lines        3498   3522      +24     
========================================
+ Hits         3463   3487      +24     
  Misses         35     35
Impacted Files Coverage Δ
src/Parse/ParseCloud.php 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2b8ea3f...a37e12f. Read the comment docs.

@montymxb montymxb merged commit af27c70 into parse-community:master Nov 14, 2017
@montymxb montymxb deleted the cloud-jobs branch November 14, 2017 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant