Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssetDaemon does not load assets without a file notification event #8

Open
azriel91 opened this issue Jul 9, 2019 · 3 comments
Open

Comments

@azriel91
Copy link
Member

azriel91 commented Jul 9, 2019

Description:

When there are assets that exist under assets/the_asset.txt, even if the AssetDaemon has a "txt" importer, it will not be run unless you touch assets/the_asset.txt while the daemon is running.

This is a surprise/gotcha in a workflow where new assets are created and saved before running the daemon.

Expected behaviour:

When the AssetDaemon starts up, it both processes and imports new assets. I think it currently processes them but does not import them.

Impact:

User frustration / confusion.

@kabergstrom
Copy link
Collaborator

I think the problem here is that the FileAssetSource only consumes "dirty file events" from the FileTracker. These events are only produced when a file has changed its contents.

So if you add or change the importer for a file extension, the FileAssetSource will not process any affected files. I think the solution to this would be for the FileAssetSource to scan its own metadata on startup to see if the set of registered importers has changed such that a reimport of certain files is required.

kabergstrom added a commit that referenced this issue Jul 26, 2019
…r_type to SourceMetadata to solve a part of issue #8. Added docs to LoadStates.
@kabergstrom
Copy link
Collaborator

I did some more work on this as per the commit above, but I noticed that in order to trigger a reimport when an importer is newly registered where previously there was none, I need to store all import results in the DB and not just if there was an importer that successfully processed a pair. That still needs to be done, and that probably means that process_pair in source_pair_import needs to return an enum result which is mirrored in the file_asset_source metadata DB.

@kabergstrom
Copy link
Collaborator

Probably relevant for @happenslol in the implementation of error states in the metadata. When changing the metadata state format, we should try to accommodate both the error state and the import result state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants