This service listens for resources of type signing:PublishedResource, with status <http://mu.semte.ch/vocabularies/ext/besluit-publicatie-publish-service/status/success>
The service then notifies an endpoint, compliant with the submission-api
In practice this will usually be automatic-submission-service.
POST /submit-publication
: endpoint for mu-delta to trigger. Can also be used to manually trigger the service for debugging purposes.
besluit-publicatie:
image: lblod/besluit-publicatie-melding-service:z.y.x
environment: # defaults params are shown here
KEY: 'api-key-as-provided' # (required)
SUBMISSION_ENDPOINT: 'http://automatic-submission-service/melding' # The target endpoint to submit to (required)
SOURCE_HOST: 'http://the.public.host.where.publication.is.available' # (required)
PUBLISHER_URI: 'http://data.lblod.info/vendors/gelinkt-notuleren'
DEFAULT_GRAPH: 'http://mu.semte.ch/graphs/public'
CACHING_CRON_PATTERN: '0 */5 * * * *'
PENDING_TIMEOUT_HOURS: '3'
MAX_ATTEMPTS: '10'
PING_DB_INTERVAL: '2'
RESCHEDULE_CRON_PATTERN: '0 0 * * *'
links:
- database:database
Provided api key for submitting to the SUBMISSION_ENDPOINT
.
URI for the endpoint where the notification (aka "melding") will be submitted to. This endpoint must comply with the submission-api specification.
Base url where the published resource can be publicly viewed. Used for generating
urls which will be submitted to the SUBMISSION_ENDPOINT
. This should point to an instance of
the publication stack
Unique identifier of the publisher (aka creator) of the published resource. Together with the api key, this forms the authentication credentials for the notification stack.
Default graph of the stack this service is a part of. Used to manage running task:Task instances.
Currently not used.
Currently not used.
Amount of times this service will retry to submit a notification to SUBMISSION_ENDPOINT
upon failure.
Time in seconds between pings to the database service while waiting for it to start. Only relevant for startup, no effect once the stack is running.
Cron pattern when the function in charge of rescheduling pending tasks and resources without tasks will run, it runs every day at 00:00 by default
export default [
{
match: {
predicate: { type: "uri", value: "http://mu.semte.ch/vocabularies/ext/besluit-publicatie-publish-service/status" },
object: { type: "uri", value: "http://mu.semte.ch/vocabularies/ext/besluit-publicatie-publish-service/status/success" }
},
callback: {
url: "http://publicatie-melding/submit-publication", method: "POST"
},
options: {
resourceFormat: "v0.0.1",
gracePeriod: 1000,
ignoreFromSelf: true
}
}
]
Once a valid resource is provided, a task:Task is created and processed. It retries in case of failure. There is also a fallback, in case of issues with notifications