[pgAdmin4][Patch]: Stop Flask from initialising service twice inDebug mode - Mailing list pgadmin-hackers

From Surinder Kumar
Subject [pgAdmin4][Patch]: Stop Flask from initialising service twice inDebug mode
Date
Msg-id CAM5-9D-1BTYsZC2VFcuDhdNeSZd+bLTWaCfTYs0eL6hiqTmS2g@mail.gmail.com
Whole thread Raw
Responses Re: [pgAdmin4][Patch]: Stop Flask from initialising service twice inDebug mode  (Surinder Kumar <surinder.kumar@enterprisedb.com>)
List pgadmin-hackers
Hi

When pgAdmin4 runs in DEBUG mode, Flask initialise service twice, while in non-DEBUG mode, once. It is pain while development because `yarn run bundle` also runs twice.

It is because the parameter `use_reloader` = True in Debug Mode.

If `os.environ` variable `WERKZEUG_RUN_MAIN` is set to None, i.e. app is starting for the first time and then its value is changed to True.

Please find attached patch.

Thanks
Surinder



Attachment

pgadmin-hackers by date:

Previous
From: Dave Page
Date:
Subject: Re: [pgadmin-hackers] [Design update] Style guide for pgAdmin4
Next
From: Surinder Kumar
Date:
Subject: Re: [pgAdmin4][Patch]: Stop Flask from initialising service twice inDebug mode