# Entrypoint output format mimeType = application/json # OpenAPI Documentation - JSON format (dot notation) post.operationId = post-v1-lda post.description = description... post.summary = summary... post.tags.0 = data-computer post.requestBody.content.application/x-tar.schema.type = string post.requestBody.content.application/x-tar.schema.format = binary post.requestBody.required = true post.responses.default.description = Informations permettant de récupérer les données le moment venu post.parameters.0.description = Indenter le JSON résultant post.parameters.0.in = query post.parameters.0.name = indent post.parameters.0.schema.type = boolean [use] plugin = basics plugin = analytics plugin = spawn # Step 0 (générique) : Lire le fichier standard tar.gz [TARExtract] compress = true # Step 1 (générique) : Créer un identifiant unique pour le corpus reçu [singleton] [singleton/identify] [singleton/env] path = generator value = lda path = identifier value = get('uri').replace('uid:/', '') # Step 2 (générique): Traiter de manière asynchnore les items reçus [fork] standalone = true # Step 2.1 (générique): Lancer un calcul sur tous les items reçus [fork/exec] # command should be executable ! command = ./v1/lda.py # Step 2.2 (générique): Création d'un fichier résulat standard [fork/TARDump] compress = true manifest = fix({version: '1'}) manifest = fix({identifier: env('identifier')}) manifest = fix({generator: env('generator')}) # Step 2.3 (générique): Sauvegarder sur disque le résulat [fork/FILESave] location = /tmp/retrieve identifier = env('identifier') jsonl = false compress = false # Step 2.4 (générique): Signaler le fin du traitement via un appel à un webhook (si il a été précisé) [fork/swing] test = env('headers.x-hook').startsWith('http') # Step 2.4.1 (générique): Séléctionner les informations à envoyer au webhook [fork/swing/replace] path = body value = self().pick(['size', 'atime', 'mtime', 'ctime']).set('identifier', env('identifier')).set('generator', env('generator')).set('state', 'ready') # Step 2.4.2 (générique): Envoyer la requète HTTP [fork/swing/URLFetch] url = env('headers.x-hook') path = body headers = Content-Type:application/json # Step 2.4.3 (faculatif) : Ajouter une trace dans log [fork/swing/debug] text = webhook triggered # Step 2.5 (faculatif) : Ajouter une trace dans log [fork/debug] text = process completed # Step 3 : Renvoyer immédiatement seul élément indiquant comment récupérer le résulat quand il sera prêt [shift] [replace] path = id value = env('generator') path = value value = env('identifier') [JSONString] indent = env('indent')