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

Database Sharing #13

Open
ramosglauco opened this issue Sep 18, 2024 · 11 comments
Open

Database Sharing #13

ramosglauco opened this issue Sep 18, 2024 · 11 comments
Labels
enhancement New feature or request
Milestone

Comments

@ramosglauco
Copy link

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 WildRikku added support Someone asking for help / not sure if it's a bug enhancement New feature or request labels Sep 19, 2024
@WildRikku
Copy link
Owner

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
Copy link
Author

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
Copy link
Owner

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
Copy link
Author

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.

@WildRikku WildRikku added this to the 1.8.0 milestone Sep 20, 2024
@WildRikku WildRikku removed the support Someone asking for help / not sure if it's a bug label Sep 20, 2024
@ramosglauco
Copy link
Author

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

@WildRikku
Copy link
Owner

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
Copy link
Author

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

@WildRikku
Copy link
Owner

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

@ramosglauco
Copy link
Author

ah, ok. Thx

Copy link

This issue has been automatically marked for closing, because it has not had activity in 30 days. It will be closed if no further activity occurs in 10 days.

@WildRikku
Copy link
Owner

Update: Just editing the value in the field in the settings dialogue is not sufficient. The path is currently hardcoded in some places. The current testing release contains the option to use an external database (MySQL or PostgreSQL). The same external database can be used by different instances of OctoPrint. This feature has experienced very little testing, so if you test it, please read the release notes and make backups. I'd appreciate any feedback though.

I still plan to make it possible to use a local database with multiple OctoPrint instances in the future, but it will not be as simple as I hoped.

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

No branches or pull requests

2 participants