Open davidemerli opened 1 year ago
Side note, I don't know if this is relevant or not but when the files get saved through Dapr local object store, the file names are mapped to random uuids
Since the requests to the server hosted on 3004 use filenames to retrieve stuff, this might be of interest
Hey, Good catch, it's been quite a while since I've done this exemple and it is indeed outdated.
So there are two distincts problems :
For the uuid, the problem is there. I only ever use S3 like storage so I didn't see that the metadata attribute name to pass to Dapr was different for S3 (attribute is key) and local storage (attribute is fileName). Not providing the right attribute when uploading a file makes dapr use a random uuid instead. This should be an easy fix. I'll patch this.
Regarding the "autocooking", this is actually expected behaviour. The "autocooking" yaml file makes the cooking server listen to the "stoppedRecordingDiscord" event on the chosen pubsub. However this event is only fired by Pandora if the recording was started by the pubsub method. (The event is fired there and using a command (ex: !record) signalState is a NO-OP.) The intended usage with commands for users to retrieve their recordings using their browser to navigate to the cooking server exposed url (http://localhost:3004/*recording-id* in your case).
That being said, I'm quite curious. Did you have a specific goal in mind using both the autocook and commands at the same time ? I've never though of this usage.
Ok, I tried the new image and the files get correctly named.
I had to remove the object store from the env configurations for the cooking server and let it access files directly from a local volume.
Just a couple more things I found while trying things out
without the OBJECT_STORE_NAME in the Pandora environment, bindings for the Inversify initialization are skipped if I remember correctly and there is something trying to access ObjectStore which leads to errors
Error: No matching bindings found for serviceIdentifier: Symbol(ObjectStore)
pandora | at _validateActiveBindingCount (/app/node_modules/inversify/src/planning/planner.ts:113:15)
pandora | at _getActiveBindings (/app/node_modules/inversify/src/planning/planner.ts:91:3)
pandora | at _createSubRequests (/app/node_modules/inversify/src/planning/planner.ts:146:22)
pandora | at plan (/app/node_modules/inversify/src/planning/planner.ts:240:5)
pandora | at /app/node_modules/inversify/src/container/container.ts:623:25
pandora | at Container._get (/app/node_modules/inversify/src/container/container.ts:574:37)
pandora | at Container._getButThrowIfAsync (/app/node_modules/inversify/src/container/container.ts:580:25)
pandora | at Container.get (/app/node_modules/inversify/src/container/container.ts:325:17)
pandora | at Object.<anonymous> (/src/inversify.config.ts:183:17)
pandora | at Module._compile (node:internal/modules/cjs/loader:1165:14)
Another things that looks a bit confusing to me (but I am not really that familiar with Discord namings) is the DISABLE_INTERACTIONS config
If I put any value into the DISABLE_INTERACTIONS, the result is that I am not able to use slash commands anymore, while the commands with the specified prefix keep on working. Is this the intended behavior or is the other way around?
Anyways, for my use case for the autocook: I wanted to make a webapp able to play recordings coming from discord Specifically I wanted to:
So for this use case I wanted to automatically process the audio files, store them in a volume and access them from the webapp without having to process them further or call the cooking server.
"autocook" seemed to be something I could work with for this use case :P
Automatic linking may be something I can only do by forking the bot for my own needs, and is honestly an hassle. I think I will just create a form field on the app frontend where to paste the recording ID. Taking this into consideration I could just make a GET to the cooking server when the recording ID is pasted in the frontend, and avoid useless computation if not needed. (this was quite a stream of though, if you want to discuss things further we may find a more suitable place to chat wrt github issues)
Hey, some news on this. I've been quite busy lately, and just got back to this. I hope you your workaround method worked out. I'm keeping this open as this is indeed something I could improve Pandora with !
Hi! I noticed that the readme is a bit outdated in some parts (like with some versions or ports specifications) and I tried to deploy Pandora with compose; I am trying to use a local object store.
Unfortunately I am having problems due to the cooking server never receiving any events.
I took some configurations from here and from the cooking server repo, and looked up into the source code for anything else that I had trouble configuring.
My current configuration is this one:
with compose being:
And here's the DAPR files: autocook.yml
object-store-local.yml
pubsub.yml
state-store.yml
and finally here's the logs from docker:
Thanks in advance for the help, if needed I can contribute to update the README configurations