Skip to content

Create Background Processing Infrastructure: Create Perflab_Background_Job Class #503

@jjgrainger

Description

@jjgrainger

Create a new Perflab_Background_Job class to represent a single job and provide methods for accessing it's data.

Acceptance Criteria

  • Create a new Perflab_Background_Job class
  • The __construct() method should accept 1 parameter
    • $term - Can either be the Job term ID or term object
  • The class should have the following methods
    • update_data( array $data ) - This method will update the jobs job_data term meta
    • data() This method will return an array of the jobs job_data term meta.
    • complete() - This method will update the following term meta.
      • job_completed_at - Set the term meta to the current timestamp
      • job_status - Set the term meta to the string completed.
    • is_complete() - This method will return a true if the job_completed_at meta is set, false if not.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions