@@ -27,9 +27,10 @@ import { IamAuthenticationPlugin } from "../../authentication/iam_authentication
2727import { BlueGreenRole } from "./blue_green_role" ;
2828import { ExecuteRouting , RoutingResultHolder } from "./routing/execute_routing" ;
2929import { CanReleaseResources } from "../../can_release_resources" ;
30+ import { FullServicesContainer } from "../../utils/full_services_container" ;
3031
3132export interface BlueGreenProviderSupplier {
32- create ( pluginService : PluginService , props : Map < string , any > , bgdId : string ) : BlueGreenStatusProvider ;
33+ create ( servicesContainer : FullServicesContainer , props : Map < string , any > , bgdId : string ) : BlueGreenStatusProvider ;
3334}
3435
3536export class BlueGreenPlugin extends AbstractConnectionPlugin implements CanReleaseResources {
@@ -42,6 +43,7 @@ export class BlueGreenPlugin extends AbstractConnectionPlugin implements CanRele
4243
4344 private static readonly CLOSED_METHOD_NAMES : Set < string > = new Set ( [ "end" , "abort" ] ) ;
4445 protected readonly pluginService : PluginService ;
46+ protected readonly servicesContainer : FullServicesContainer ;
4547 protected readonly properties : Map < string , any > ;
4648 protected bgProviderSupplier : BlueGreenProviderSupplier ;
4749 protected bgStatus : BlueGreenStatus = null ;
@@ -53,18 +55,19 @@ export class BlueGreenPlugin extends AbstractConnectionPlugin implements CanRele
5355 protected endTimeNano : bigint = BigInt ( 0 ) ;
5456 private static provider : Map < string , BlueGreenStatusProvider > = new Map ( ) ;
5557
56- constructor ( pluginService : PluginService , properties : Map < string , any > , bgProviderSupplier : BlueGreenProviderSupplier = null ) {
58+ constructor ( servicesContainer : FullServicesContainer , properties : Map < string , any > , bgProviderSupplier : BlueGreenProviderSupplier = null ) {
5759 super ( ) ;
5860 if ( ! bgProviderSupplier ) {
5961 bgProviderSupplier = {
60- create : ( pluginService : PluginService , props : Map < string , any > , bgdId : string ) : BlueGreenStatusProvider => {
61- return new BlueGreenStatusProvider ( pluginService , props , bgdId ) ;
62+ create : ( servicesContainer : FullServicesContainer , props : Map < string , any > , bgdId : string ) : BlueGreenStatusProvider => {
63+ return new BlueGreenStatusProvider ( servicesContainer , props , bgdId ) ;
6264 }
6365 } ;
6466 }
6567
6668 this . properties = properties ;
67- this . pluginService = pluginService ;
69+ this . servicesContainer = servicesContainer ;
70+ this . pluginService = servicesContainer . pluginService ;
6871 this . bgProviderSupplier = bgProviderSupplier ;
6972 this . bgdId = WrapperProperties . BGD_ID . get ( this . properties ) . trim ( ) . toLowerCase ( ) ;
7073 }
@@ -215,7 +218,7 @@ export class BlueGreenPlugin extends AbstractConnectionPlugin implements CanRele
215218 private initProvider ( ) {
216219 const provider = BlueGreenPlugin . provider . get ( this . bgdId ) ;
217220 if ( ! provider ) {
218- const provider = this . bgProviderSupplier . create ( this . pluginService , this . properties , this . bgdId ) ;
221+ const provider = this . bgProviderSupplier . create ( this . servicesContainer , this . properties , this . bgdId ) ;
219222 BlueGreenPlugin . provider . set ( this . bgdId , provider ) ;
220223 }
221224 }
0 commit comments