Repository navigation
fix(external_script): fix crash during concurrent cleanup - #74
Thibault-Pelletier wants to merge 1 commit into
Conversation
1674ad1 to
f0e3afd
Compare
Fix crash in external script cleanup when application is run in multi concurrent process.
f0e3afd to
cd7eff5
Compare
|
Thanks for the fix, looks very nice at first glance |
|
I had a feeling about it, and after testing I confirm this breaks the docker image build assets collection. We might to think of a better way to handle this. The problem is that trame.tools.www expects to find the static assets, but since that change make it that the module cleans after itself, the assets are not here. |
|
let me think about it |
|
any idea maybe @jourdain ? |
|
A simple solution would be to keep (partially) the old behavior so that the assets are placed at the correct location ( Another solution could be to have some kind of "webserver" mode we could use to tell trame-client (and any other trame package...) that the assets are being taken care of by the web server and there's nothing to do in the module init. (besides the server.enable_module call). But I'm not sure I like it because AFAIK, the external script feature is the only one that allow library consumers to register custom scripts to be served directly by the web server. Well you can do it manually, but in this case it is not trame's job to make sure everything is being cleared/served properly |
|
From a discussion with Thibault:
|
|
Technically, we already have a cli flag |
|
After discussing with @bourdaisj, and following discussions in this thread, this PR is not going in the right direction to reliably serve custom JS files / fix the concurrency issue. I'll be closing it and we will keep on iterating on the approach with other trame developers. |
|
Thanks @jourdain ; I forgot about that one. We should definitely use it for those kind of use-case.
|
Fix crash in external script cleanup when application is run in multi concurrent process.