How do I specify producer and consumer workers in TOML under an environment?

TOML continues to hurt my head and I'm struggling to bind queues within an environment. I've tried the following (both suggested by Cursor but both apparently wrong):
[env.production]
queues = {
producers = [
{ queue = "my-queue", binding = "MY_QUEUE" }
]
}
[env.production]
queues = {
producers = [
{ queue = "my-queue", binding = "MY_QUEUE" }
]
}
and
[env.production]
queues = [
{ queue = 'user-msg-ai-analysis', binding = 'USER_MSG_AI_ANALYSIS', type = "producer" }
]
[env.production]
queues = [
{ queue = 'user-msg-ai-analysis', binding = 'USER_MSG_AI_ANALYSIS', type = "producer" }
]
What's the correct syntax here?
2 Replies
Hard@Work
Hard@Work•2mo ago
Have you tried JSON, if that is easier?
Mitya
MityaOP•2mo ago
Funnily enough it was shortly after this that I took the long-postponed decision to switch once and for all to JSON. Me and TOML just don't get on 😠 (And yet I'm still curious what the correct TOML syntax for the above would be.)

Did you find this page helpful?