materialsproject / fireworks

The Fireworks Workflow Management Repo.
https://materialsproject.github.io/fireworks
Other
361 stars 185 forks source link

ENH: Find orphaned Fireworks and remove from db #404

Closed jotelha closed 4 years ago

jotelha commented 4 years ago

At some point I encountered the issue of many "orphaned" Fireworks (which did not belong to any workflow any longer) in the database (possibly to some interrupted delete of whole workflows). Many Fireworks commands will refuse to operate on such an inconsistent database. I recommend some maintenance option as suggested here to find (and remove, if desired) such "orphaned" Fireworks, which don't belong to any workflow.

Code and command line interface are largely copied from the get_fws and get_wfs functions, with according modifications.

computron commented 4 years ago

I have no objections to this function, but think stylistically some improvements should be made to make sure the code stays robust to changes and perhaps to improve the speed. I added some comments to this conversation, let me know what you think.

computron commented 4 years ago

Thanks!