This is kind of a wild one. Turns out that the triggers I was using
actually fire before the transaction is closed and I was primarily
getting lucky that the job was present on the other side of the
connection rather than having things built correctly.
I've fixed this by removing the trigger entirely and instead manually
triggering as part of the transaction. This makes the NOTIFY call happen
as soon as the transaction closes, just at the cost of making my
application be in charge of ensuring the NOTIFY gets called. Seems like
a win.
Part of doing this is porting the existing job creation code over to use
Jet. It's something I want to do anyway, so it's a win all around.
The key item here is that comms.phone and comms.email are meant to
represent a real global namespace, but comms.contact is meant to
represent an organization-specific namespace. This means the mapping,
comms.contact_phone and comms.contact_email can't key off the global
namespace. Otherwise the contact namespace would implicitly be global.
This is as a complicated one because it involves merging contact
information in tricky cases.
I assume that phone should override email, primarily because setting up
phones is more tightly regulated. This may be a terrible assumption.
Issue: #13
- Add ErrorNotification component above the contact form
- Replace console.error with user-visible error messages in
handleSubmit for both HTTP error responses and exceptions
- Add isSubmitting ref with :disabled binding to prevent
double-submission (consistent with Nuisance/Water forms)
- Clear errorMessage on each submission attempt
Issue: #8
ContactSimple is the replacement for ContactReporter, which was the
simplified form of a contact from a report. I made the name more generic
and use it in the general report structures for consistency.
- Add ts/rmo/components/ErrorNotification.vue — reusable error alert
with dismiss support, accessible markup, and configurable message
- Replace inline error div in Nuisance.vue with ErrorNotification
- Add resp.ok check in doSubmit() so HTTP error responses are caught
and the workflow stops instead of proceeding to /submitted
- Fix typo: borwser → browser
Issue: #8
This is creating a large number of goroutines that are requesting a
large number of database connections, possibly contributing to the pool
getting exhausted
Issue: #3
We don't have go built-in VCS information in a nix build because the git
repository isn't present. After struggling to build an overlay that
would provide it, I decided this path is easier of just injecting in the
data that we need.
Issue: #5