LogoLogo
  • LEARN
    • Overview
    • Capabilities
      • Rich and Diverse Assets
      • Organised Collections
      • Asset Lifecycle Management
      • Powerful Discovery
      • Phygital Discovery
      • Observability
    • Technical Architecture
    • Product & Developer Guide
      • Content Service
        • Content APIs
          • Features
          • Architecture
          • Code Structure
          • Schemas
          • APIs
          • Jobs
            • Content publish
            • Asset enrichment
            • Audit event generator
            • Video stream generator
          • FAQs
            • Upload Content
        • Media APIs
          • Features
          • Architecture
          • Schemas
          • APIs
          • Jobs
            • Asset enrichment
            • Audit event generator
          • FAQs
        • Channel APIs
          • Architecture
          • Schema
          • APIs
          • Configuration
          • FAQs
        • License APIs
          • Architecture
          • Schema
          • APIs
          • Configuration
          • FAQs
        • Collection APIs
          • Features
          • Architecture
          • Schemas
          • APIs
          • Jobs
            • Content publish
            • Post publish processor
            • Audit event generator
          • FAQs
      • Search Service
        • Architecture
        • Code Structure
          • Configuration
        • APIs
        • Jobs
          • Search indexer
          • Audit history indexer
        • FAQs
      • Taxonomy Service (Taxonomy & Tagging)
        • Framework APIs
          • Architecture
          • Code Structure
            • Configuration
          • Schemas
          • APIs
          • Jobs
            • Audit event generator
          • FAQs
            • Create Framework
            • Add Content to Framework
        • Object Category APIs
          • Architecture
          • Code Structure
          • Schemas
          • APIs
          • Jobs
            • Audit event generator
          • Configuration
          • FAQs
      • DIAL Service
        • Architecture
        • APIs
        • Jobs
        • Configuration
        • FAQs
          • Link DIAL Code to a Book
      • Player
        • V1
          • Features
          • Architecture
          • Players
            • ECML Player - v1
              • Quiz
              • Create Content
            • Video Player v1
            • Epub Player - v1
            • PDF Player - v1
            • HTML-h5p Player - v1
          • Content import and preview folder creation
          • FAQs
        • V2
          • PDF Player
            • Features
            • Architecture
            • Configuration
            • FAQ's
          • Epub Player
            • Features
            • Architecture
            • Configuration
            • FAQ's
          • Video Player
            • Features
            • Architecture
            • Configuration
            • FAQ's
        • Telemetry Events
          • Offline Telemetry
          • Generate API keys
      • Editors
        • Architecture
        • Interactive Editor
          • Features
            • Content Editor
            • Adding Question Set
            • Concept Selector
            • Add Image
            • Add Video
            • Adding Math Function
            • Limited Publishing and Sharing
        • File Upload Editor
          • Features
          • FAQ's
            • Content Upload
        • Collection Editor - V1
        • Collection Editor - V2
          • Features
          • Architecture
          • APIs
          • FAQ's
        • How to contribute as a JS plugin
          • How do I think about a plugin?
          • Interactive Editor Plugin Guide
          • Using SDK to create and test the plugin
      • Other Knowlg Jobs
        • Configuration
        • FAQs
      • Other
        • Data Migration
        • Schema strucure
    • Product Roadmap
  • ENGAGE
    • Discuss
    • Contribute to SB Knowlg
  • USE
    • Overview
    • System requirements
    • Installation guide
      • Players
        • V1
          • How to setup
        • V2
          • Epub Player
          • Video Player
          • Pdf Player
      • Editors
        • Interactive Editor
        • File Upload Editor
        • Collection Editor - V1
        • Collection Editor - V2
        • Plugins
      • Services
        • Content Service
          • Configuration
        • Search Service
        • Taxonomy Service (Taxonomy & Tagging)
        • DIAL Service
        • Knowlg Jobs
    • Deployment
    • Release notes
      • Release - 6.2.0 (Ongoing)
      • Release - 6.1.0 (latest)
      • Release - 6.0.0
      • Release - 5.7.0
      • Release - 5.6.0
      • Release - 5.5.0
      • Release - 5.4.0
      • Release - 5.3.0
      • Release - 5.2.0
      • Release - 5.1.0
      • Release - 5.0.0
      • Release - 4.10.0
      • Release - 4.8.0
    • Breaking Changes
    • Deprecations
      • Release-5.2.0
      • Release-5.1.0
    • Release
    • USE
      • Infra Requirements
    • Additional Reading
      • Content Service Environment Variables
      • Import External Content
  • Archived
    • Powerful Discovery
      • Usecase
      • Sample data
Powered by GitBook
On this page
  • post-publish-processor:
  • Code:
  • Configuration:

Was this helpful?

Edit on GitHub
  1. LEARN
  2. Product & Developer Guide
  3. Content Service
  4. Collection APIs
  5. Jobs

Post publish processor

PreviousContent publishNextAudit event generator

Last updated 1 year ago

Was this helpful?

post-publish-processor:

The Job plays a crucial role in triggering post-publish activities, specifically when a collection is published. Some of these post-publish activities include:

  1. Shallow Copy: In the case of shallow copy type collections, the Job republishes the hierarchy information when an origin collection is published. This ensures that the hierarchy is correctly updated, reflecting changes made during the publishing process.

  2. Default DIAL Code Generation: For a 'Course' collection primaryCategory object, the Job takes care of reserving a DIAL Code and generating QR Code images for the reserved DIAL code by default. This ensures that each 'Course' object is uniquely identified with a DIAL Code and that QR Code images are available for easy access and scanning.

  3. Course Batch Creation: Based on the 'traceability' configuration, the Job triggers the automatic creation of course batches for 'Course' primaryCategory objects if there are no running batches already existing. This automated batch creation simplifies the process of managing course enrolments and ensures efficient course administration.

  4. DIAL Code Context Update: Upon publishing a collection/content, the Job initiates individual context update events for newly added DIAL codes and removes DIAL codes associated with the published collection/content. This ensures that the DIAL code context is consistently updated to reflect the changes made during the publishing process.

In summary, the Job's post-publish activities encompass a range of crucial tasks, from updating hierarchy information and generating default DIAL codes to creating course batches and managing DIAL code context updates. These activities collectively contribute to a seamless and efficient post-publish workflow, ensuring accurate and consistent data handling throughout the publishing process.

Code:

Configuration:

During the deployment process, the configuration for all knowledge-platform-jobs is sourced from the sunbird-learning-platform repository. On the other hand, for local setups, the configuration is taken from the respective job folders within the knowledge-platform-jobs repository.

Kafka Topic:

kafka {
      input.topic = {{ env_name }}.content.postpublish.request
      groupId = {{ env_name }}-post-publish-processor-group
      
      publish.topic = {{ env_name }}.publish.job.request
      qrimage.topic = {{ env_name }}.qrimage.request
      dialcode.context.topic = {{ env_name }}.dialcode.context.job.request
    }

Job configuration variables:

No job functionality specific variables to list.

Sample Kafka event:

{
  "eid": "BE_JOB_REQUEST",
  "ets": 1649170015935,
  "mid": "LP.1649170015935.2a7382ff-8bc9-4ff5-8620-2d467cf8990a",
  "actor": {
    "id": "Post Publish Processor",
    "type": "System"
  },
  "context": {
    "pdata": {
      "ver": "1.0",
      "id": "org.sunbird.platform"
    },
    "channel": "01272777697873100812",
    "env": "sunbirdstaging"
  },
  "object": {
    "ver": "1649169952265",
    "id": "do_21350999965318348811690"
  },
  "edata": {
    "action": "post-publish-process",
    "iteration": 1,
    "identifier": "do_21350999965318348811690",
    "channel": "01272777697873100812",
    "mimeType": "application/vnd.ekstep.content-collection",
    "contentType": "Course",
    "pkgVersion": 1,
    "status": "Live",
    "name": "CourseMTimmothy",
    "trackable": {
      "enabled": "Yes",
      "autoBatch": "No"
    }
  }
}

Dependency: 1. Kafka Jobs: 'qrcode-image-generator', 'content-publish' (For Shallow Copy Collections publishing)

2. Services: Asset Search Service (), LMS Service (), Learning Service to reserve DIAL codes for a collection.

Search API
Course Batch Create
🌠
https://github.com/Sunbird-Knowlg/knowledge-platform-jobs/tree/release-5.5.0/post-publish-processor