thekid / dialog

Dialog photoblog
2 stars 1 forks source link

Watch "processing" collection and process images #46

Open thekid opened 1 year ago

thekid commented 1 year ago

Implements media processor container as described in #44

Build and run

Run the following commands:

$ docker build -t thekid/dialog-processing -f Dockerfile.processing .
# ...

$ docker run --rm -it -e DIALOG_API -e MONGO_URI -e MONGO_DB thekid/dialog-processing
# ...

Trigger

Copy the original image into the imports directory, simulating an upload. Then, insert the following document into the processing collection:

{
  "slug":"rueppur_alb_2022-11-13",
  "file":"20221113_151718315_iOS.jpg",
  "at":{"$date":{"$numberLong":"1668873515000"}},
  "state":"new"
}

Example

Processing an image

image

Error handling

After connection was closed

image