On Tue, Dec 15, 2015 at 4:52 PM, Sajith Kariyawasam <[email protected]> wrote:
> Hi Devs,
>
> Can someone clarify this code?
>
> In AutoscalerServiceImpl undeployApplication method I can see following
> logic
>
> if (!applicationSignUpExists) {
> ...
> --> undeployApplicationGracefully ()
> }
>
> If application signups exists we don't need to allow the application
un-deployment. So we are checking the application signups and block the
un-deployment.[1]
> Inside undeployApplicationGracefully method I can
> see removeApplicationSignUp is invoked.
> But why its needed since this code executes only if *not*
> applicationSignUpExists ?
>
Yeah. That's not needed since we don't have the signups for the application
in this logic execution point.[2]
[1]
https://github.com/apache/stratos/blob/master/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java#L483
[2]
https://github.com/apache/stratos/blob/master/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java#L546
> Thanks,
> Sajith
>
> --
> Sajith Kariyawasam
> *Committer and PMC member, Apache Stratos, *
> *WSO2 Inc.; http://wso2.com <http://wso2.com>*
> *Mobile: 0772269575*
>
--
Gayan Gunarathne
Technical Lead, WSO2 Inc. (http://wso2.com)
Committer & PMC Member, Apache Stratos
email : [email protected] | mobile : +94 775030545 <%2B94%20766819985>