1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

8 commits

Author SHA1 Message Date
Jeremy Daer
4d292fc0e7
Clarify how a service can build other composed services
* Service.build takes the literal YAML config hash for the service and a
  reference to the Configurator that's doing the building.
* Services that compose additional services can use the Configurator to
  look them up and build them by name. See MirrorService for an example.

References #23
2017-07-09 04:46:59 -07:00
Jeremy Daer
1a17cfb9d9
Service: clarify Service.build arguments
First arg is config for the service we're instantiating.

Second arg is service configurations so we can look up and configure
other services by name.
2017-07-09 03:19:58 -07:00
Jeremy Daer
e5503399c0 Configure services that reference other services
* Move service configuration from the Engine to Service
* Delegate configuration mechanics to internal Service::Configurator
* Delegate service building to the concrete Service classes, allowing
  them to configure composed services.
* Implement for the Mirror service.
2017-07-08 17:27:31 -07:00
Jeremy Daer
6116313da4 Mirror: explicit primary service and list of mirrors
Pass separate primary service and list of mirrors rather than treating
the first of the services list as the primary. Nice fit for keyword args,
and something we've long wanted in the equivalent Basecamp file repository.

Upload returns the results of the underlying service uploads rather than
the io.rewind result. Rewind before uploading rather than afterward, and
demonstrate that behavior with a test.

Test that more than one mirror works.
2017-07-08 17:16:52 -07:00
George Claghorn
04e6728dd5 Remove unnecessary method delegations 2017-07-06 17:00:47 -04:00
David Heinemeier Hansson
894e1e3183 Check integrity after uploads 2017-07-06 16:01:11 +02:00
George Claghorn
a8e849bb0d Mirror: only hit all sites for upload and delete
The mirror service exists for the purpose of migration, where all blobs exist in the primary subservice and a subset of blobs exist in the secondary subservice. Since the primary subservice is the source of truth until a migration is completed, operations like existence checks need not be performed against the secondary subservices.
2017-07-06 07:30:21 -04:00
David Heinemeier Hansson
35d5bddabc Rename from Site to Service now that we're called Active Storage 2017-07-06 12:22:44 +02:00