...
The publishing of the first question set will happen first, followed by the subsequent question set, and finally the content.
When the publish API for question sets is called, all the question sets and the video is moved to Processing state. This way, in case of a failure, videos stuck in Processing state can be looked up, and the failure analysed.
The publish event structure will be enhanced to add the details of the chain i.e. the sequence and the IDs of the content. As the chain progresses, each publish event will have the current state of the chain i.e. which are the preceding successful publishes, and which are the ones up next. Proposed changes to the publish event are below
Code Block | ||
---|---|---|
| ||
{
"eid": "BE_JOB_REQUEST",
"ets": 1634812181709,
"mid": "LP.1634812181709.88b311c2-a733-4846-b2a2-31d9dceda436",
"actor": {
"id": "Publish Samza Job",
"type": "System"
},
"context": {
"pdata": {
"ver": "1.0",
"id": "org.sunbird.platform"
},
"channel": "0133866213417451520",
"env": "dev"
},
"object": {
"ver": "1634810156009",
"id": "do_213392364484722688135"
},
"edata": {
"publish_type": "public",
"metadata": {},
"publishchain": [
{
"identifier": "do identifier of questionset 1",
"mimeType": "application/vnd.sunbird.questionset",
"lastPublishedBy": "2ca3f787-379f-42d4-9cc3-6bc03a2d4cca",
"pkgVersion": null,
"objectType": "QuestionSet",
"state": "Processing",
"publishErr": "",
"order": 1
},
{
"identifier": "do identifier of questionset 2",
"mimeType": "application/vnd.sunbird.questionset",
"lastPublishedBy": "2ca3f787-379f-42d4-9cc3-6bc03a2d4cca",
"pkgVersion": null,
"objectType": "QuestionSet",
"state": "Processing",
"publishErr": "",
"order": 2
},
{
"identifier": "do_213392364484722688135",
"mimeType": "video/mp4",
"lastPublishedBy": "2ca3f787-379f-42d4-9cc3-6bc03a2d4cca",
"pkgVersion": null,
"objectType": "Content",
"state": "Processing",
"publishErr": "",
"order": 3
}
],
"action": "publishchain",
"iteration": 1,
"contentType": "Resource"
}
} |
As the publish progresses, the publishchain gets updated as below
Code Block | ||
---|---|---|
| ||
"publishchain": [
{
"identifier": "do identifier of questionset 1",
"mimeType": "application/vnd.sunbird.questionset",
"lastPublishedBy": "2ca3f787-379f-42d4-9cc3-6bc03a2d4cca",
"pkgVersion": null,
"objectType": "QuestionSet",
"state": "Live",
"publishErr": "",
"order": 1
},
{
"identifier": "do identifier of questionset 2",
"mimeType": "application/vnd.sunbird.questionset",
"lastPublishedBy": "2ca3f787-379f-42d4-9cc3-6bc03a2d4cca",
"pkgVersion": null,
"objectType": "QuestionSet",
"state": "Live",
"publishErr": "",
"order": 2
},
{
"identifier": "do id of video",
"mimeType": "video/mp4",
"lastPublishedBy": "2ca3f787-379f-42d4-9cc3-6bc03a2d4cca",
"pkgVersion": null,
"objectType": "Content",
"state": "Processing",
"publishErr": "",
"order": 3
}
] |
There is no change to the ECAR generation, each publish event will work as today, to generate an ECAR for each question set and the content.
...
There is no change, since if a question set or content fails to publish the publish error is already updated in the content. However, the UI side would need to be enhanced to give visibility of the failure to the creator.
The UI can provide a way to view a list of content in Processing state. The UI will also allow to view the publishing state of each of the Question Sets contained within the content, this will allow troubleshooting in case the Content is stuck in Processing state due to one of the Question Sets failing to publish.
Impact on App
For the interactive content, the app will need to download the Question set ECARs in addition to the content ECAR. The content IDs for the question sets used by a content are available in the new attributes in the content model
...