Using the clever concurrency testing borrowed from SubscriptionPlacementJob, but I thought a shorter pause time (just 100ms) would be sufficient.
I considered doing this with a new 'state' field (upcoming/open/close), but decided to keep it simple.
Although we won't be allowing multiple in the this PR, we certainly plan to in the future.
The migration helper add_reference couldn't handle the custom column name, so I had to put it together manually.
This will store the URL for each user that wants a notification.
We probably don't need URL validation (it's not done on Enterprise for example). It could be validated by browser input, and anyway will be validated if the webhook actually works or not.
Inspired by Keygen: https://keygen.sh/blog/how-to-build-a-webhook-system-in-rails-using-sidekiq/
Once upon a time it was used to search for enterprises in a certain
suburb. But we let Google Maps do that these days and the feature was
removed in 2015.
* c4fb4a8510
We activated this database extension in production via ofn-install. But
this had not been reflected in Rails' schema.rb.
This change avoids inconsistent db/schema.rb files on production servers
and makes development more similar to production.
I randomly stumbled across this one and couldn't find any use of it. I
think that it refers to an old payment gateway that may have been used
by Spree once upon a time.
Before the OrderCycleShippingMethod had a validation which checked the shipping method belonged to the order cycle distributor. Instead of this validation this just ignores shipping methods which don't belong to one of the order cycle's distributors when they are being attached in the OrderCycleForm service. This pattern is already being used in the OrderCycleForm service for ignoring Schedules that the person doesn't own.
Co-authored-by: Maikel <maikel@email.org.au>
It makes things much simpler if we return all shipping methods by default without needing OrderCycleShippingMethod records to be added to the database.
Co-authored-by: Maikel <maikel@email.org.au>
Rails seems to have changed the options in schema.rb at some point to
include more specifics but we didn't record this in our tracked
schema.rb. As a result, production shows changes in that file after
running migrations.
Sometimes I also use production dumps in development, for example to
test migrations. Then the schema is changed for the migration and for
these syntax changes. Synching the schema with migration should
standardise all our setups and and make git diffs clearer.
fa74dae99c changed the schema file even
though the migration doesn't touch the database structure. A previous
development version of the migration did this but the finally merged
version didn't. So this schema is not valid. Let's hope that nobody set
up a new instance with the changed schema and we just fix it to what it
was before.
The icons are not used any more and the default icon file never existed
in our code base (only in Spree when we depended on that).
And it's better to remove this clutter before migrating those files to
Active Storage.
We are keeping the icon files in storage as a backup. The whole folder
`/spree/taxons` can be deleted when desired. But storage is cheap.