Ppchelko has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/348136 )
Change subject: Event schema for job queue event. ...................................................................... Event schema for job queue event. A very early proposal for a schema for the JobQueue event. Mostly modelled after what's currently going on in the JobQueue, with the addition of our `meta` parameter. Potential improvement - generalise the deduplication information pieces and reuse in other events, but too early for that. Bug: T157094 Change-Id: Ie83d0a8ba7d83c4b6e036c23c0eac877560e155a --- A jsonschema/mediawiki/job/1.yaml 1 file changed, 85 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/event-schemas refs/changes/36/348136/1 diff --git a/jsonschema/mediawiki/job/1.yaml b/jsonschema/mediawiki/job/1.yaml new file mode 100644 index 0000000..f2d49f0 --- /dev/null +++ b/jsonschema/mediawiki/job/1.yaml @@ -0,0 +1,85 @@ +title: mediawiki/job +description: > + Represents a job in Mediawiki JobQueue. +$schema: http://json-schema.org/draft-04/schema# +type: object +properties: + ### Meta data object. All events schemas should have this. + meta: + type: object + properties: + topic: + description: The queue topic name this message belongs to. + type: string + schema_uri: + description: > + The URI identifying the jsonschema for this event. This may be just + a short uri containing only the name and revision at the end of the + URI path. e.g. schema_name/12345 is acceptable. This field + is not required. + type: string + uri: + description: The unique URI identifying the event. + type: string + format: uri + request_id: + description: The unique UUID v1 ID of the event derived from the X-Request-Id header. + type: string + pattern: '^[a-fA-F0-9]{8}(-[a-fA-F0-9]{4}){3}-[a-fA-F0-9]{12}$' + id: + description: The unique ID of this event; should match the dt field. + type: string + pattern: '^[a-fA-F0-9]{8}(-[a-fA-F0-9]{4}){3}-[a-fA-F0-9]{12}$' + dt: + description: The time stamp of the event, in ISO8601 format. + type: string + format: date-time + domain: + description: The domain the event pertains to. + type: string + required: + - topic + - uri + - id + - dt + - domain + + type: + description: type of the job + type: string + + page_namespace: + description: the namespace of the page that the job was triggered for + type: integer + + page_title: + description: the title of the page that the job was triggered for + type: string + + delay_until: + description: don't execute the job until a particular time + type: string + format: date-time + + sha1: + description: unique ID of the job derived from the deduplication info + type: string + + params: + description: various parameters speific to a particular job + type: object + additionalProperties: true + properties: + root_job_timestamp: + description: the timestamp of the root job for this leaf job + type: string + format: date-time + root_job_sha1: + description: the unique signature of the root job used for deduplication + +additionalProperties: true +required: + - meta + - type + - page_namespace + - page_title \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/348136 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie83d0a8ba7d83c4b6e036c23c0eac877560e155a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/event-schemas Gerrit-Branch: master Gerrit-Owner: Ppchelko <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
