ssg icon indicating copy to clipboard operation
ssg copied to clipboard

Fix race-condition with multiple workers

Open obelloc opened this issue 5 months ago • 0 comments

When running ssg with multiple workers, different forked processes might check for an existing folder and attempt to create it "simultaneously", which will cause makeDirectory to fail (folder already exists) and ssg to abort.

The fix uses 'force' to ignore errors on makeDirectory(). If it fails with errors other than 'folder already exists', then the following put() should also fail, meaning, it won't go unnoticed.

obelloc avatar Aug 04 '25 12:08 obelloc