Skip to content

Dataset directory still set to "./storage" after configuration set in code #2197

Answered by B4nan
jo-sip asked this question in Q&A
Discussion options

You must be logged in to vote

Creating the config instance itself is not enough, you need to use it in all the methods touching the storage. Alternatively, you can modify the global config instance:

Configuration.set('purgeOnStart', true); // FYI this is the default
Configuration.set('persistStateIntervalMillis', 10_000);
Configuration.set('storageClientOptions', { localDataDirectory: path.join(__dirname, ".tmp", "crawlee-data") });

Also this needs to happen before you touch any storage API.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jo-sip
Comment options

Answer selected by jo-sip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
bug Something isn't working.
2 participants
Converted from issue

This discussion was converted from issue #2196 on November 25, 2023 20:57.