materialsproject / fireworks

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

Fix recover_offline error: replace deprecated count() with countDocum… #538

Open bsplu opened 1 month ago

bsplu commented 1 month ago

Title:
Fix: Resolve error in recover_offline for compatibility with MongoDB 4.0+.

Summary

Major changes:

This change is required because PyMongo no longer supports the count() method. Instead, the count_documents() method from the Collection class should be used. For more details, refer to the PyMongo documentation and MongoDB documentation.

Checklist