WildRikku / OctoPrint-SpoolManager

Plugin for managing spools and all their usage metadata
GNU Affero General Public License v3.0
7 stars 0 forks source link

Database Sharing #13

Open ramosglauco opened 1 month ago

ramosglauco commented 1 month ago

Hi. I have 2 printers connected to the same raspberry. Each printer runs its own instance of octoprint. I would like to share the same SpoolManager database for both printers. Is this possible? Thx!

WildRikku commented 1 month ago

Hi, this is currently not possible via the UI. It is also untested if it works at all.

If you need this quickly and are familiar with the Linux shell, you could try:

  1. setting up SpoolManager on both instances of OctoPrin (no spools, just installation),
  2. shutting down both instances,
  3. then on the Pi shell deleting the database file of SpoolManager of one instance and replacing it with a symlink to the other database: Note how the file is called (it's in SpoolManager settings under storage), delete it and then ln -s <path to other database> <previous database name without path>.

Please note that the database file you delete will be permanently lost.

Also please note that this is untested. It should work, but it will cause issues if both instances of OctoPrint try to write to the database of SpoolManager at the same time, because the plugin will not know that it's sharing the file. If you try this, please let me know if it worked. Please make backups.

ramosglauco commented 1 month ago

Unfortunately I don't have the necessary knowledge to do this myself. Would it be possible for you to provide the option to share the same database link directly in the plugin UI?

Sorry for the simplistic question, but what would happen if this link were editable and I put exactly the same one for my other instances? For exemple

Spool Manager storage menu in my Octoprint1 image

Spool Manager storage menu in my Octoprint2 image

WildRikku commented 1 month ago

I have just recently adopted the plugin, so I don't know how easy it would be to make that field editable and actually work. I think it's possible though - it would result in the same behaviour as the suggestion I made for the command line.

I have marked this ticket as enhancement suggestion and will look into it. I think it would be useful. :)

ramosglauco commented 1 month ago

I suggest placing a checkbox to allow editing of the field. And leave a warning that this is something "beta" for now.

Thank you for adopting this plugin. It is extremely useful, especially for those who work with large-scale 3D printing like me.

ramosglauco commented 1 month ago

Can you make a beta version available with field editing permission for testing?

WildRikku commented 1 month ago

It's not done with making the text field editable. It's currently without function. I can make a beta version available as soon as I have actually programmed the functionality.

I will soon release a new stable version that will make a "testing" channel available. If you subscribe to that "testing" channel, you will get the feature in beta state as soon as I release it.

ramosglauco commented 1 month ago

Hi. Any updates on this feature or a new version of the plugin?

WildRikku commented 1 month ago

Not yet. Any updates will be posted on this issue or in release notes of published versions, which you will receive via OctoPrint.

ramosglauco commented 1 month ago

ah, ok. Thx