connect-pg-simple takes 10s to shutdown
See original GitHub issueNode version: 10.16.0 Sails version (sails): 1.2.3 ORM hook version (sails-hook-orm): DB adapter & version (e.g. sails-mysql@5.55.5): sails-postgresql 1.0.2
connect-pg-simple
takes 10s to shutdown at the end of tests.
Example project at: https://github.com/alxndrsn/sailsjs-connect-pg-simple-shutdown-delay
To recreate:
git clone https://github.com/alxndrsn/sailsjs-connect-pg-simple-shutdown-delay
cd sailsjs-connect-pg-simple-shutdown-delay
$ yarn test
...
connect-pg-simple leaves a hanging promise
✓ leaves a hanging promise...
1 passing (542ms)
Done.
Done in 11.73s.
$ IN_MEMORY_SESSIONS=true yarn test
...
connect-pg-simple leaves a hanging promise
✓ leaves a hanging promise...
1 passing (530ms)
Done.
Done in 1.70s.
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
connect-pg-simple - npm
A simple, minimal PostgreSQL session store for Connect/Express. Latest version: 8.0.0, last published: 2 months ago.
Read more >Switching out of S mode in Windows - Microsoft Support
On your PC running Windows 11 in S mode, open Settings > System > Activation. · In the Switch to Windows 11 Pro...
Read more >Restart your iPhone - Apple Support
Press and hold either volume button and the side button until the power-off slider appears. The volume button is located on the left...
Read more >How to turn off News And Interests in Windows 10's taskbar
Windows 10's News and Interests taskbar tool is a handy feature for ... taking up space on your taskbar, however, getting rid of...
Read more >Android Beta Program - Google
Android Beta for Pixel offers you a simple way to try pre-release versions of ... into with your Google account as the primary...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This also prevents
sails console
orsails lift
from shutting down quickly.Again this can be worked around by calling
sails.config.session.store.close();
in the callback fromsails.lift()
inapp.js
:It seems you can work around this by manually destroying the session postgresql pool, using
sails.config.session.store.close();
.In the example project, this can be done by changing
test/config.js
to: