n1kdo / n1mm_view

Real-time statistics viewer for N1MM+ on Field Day
BSD 2-Clause "Simplified" License
32 stars 13 forks source link

Some issues with headless.py #27

Closed ny4i closed 4 years ago

ny4i commented 4 years ago

Jeff - I found some issues with headless and I needed to change not to make it run. I will send a pull request with my changes but I wanted to confirm something.

I could not figure out where the code to setup the directory not he RAM disk went then I realized you changed the INIT to create the directory at start-up. Is that the idea so the script does not have to create the directory? I added that back in as my original changes had it.

Is it OK to leave that in as a check so if someone does not have the INIT script to create the directory in RAM that the script will create them?

Thanks - Tom

n1kdo commented 4 years ago

Hi, I don't actually run it headless. ke0pci is your man. He made those changes.

ke0pci commented 4 years ago

Tom,

I think something happened with autocorrect when you were typing that. What did you need to change for headless to work? Most of my changes were around getting the base install for Raspberry Pi down to 2-3 commands. I am happy to revisit the RAMdisk setup to make sure it works for all cases. I just need to make sure I see it clearly.

John

From the global headquarters of amateur radio station KE0PCI

On Fri, Jan 17, 2020 at 5:27 AM Jeff Otterson notifications@github.com wrote:

Hi, I don't actually run it headless. ke0pci is your man. He made those changes.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/n1kdo/n1mm_view/issues/27?email_source=notifications&email_token=AME3DXDNPTOMWGGOOW5C3J3Q6GPZ5A5CNFSM4KICECS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJHQ6PA#issuecomment-575606588, or unsubscribe https://github.com/notifications/unsubscribe-auth/AME3DXHPGWGU7V5MZJZN6ETQ6GPZ5ANCNFSM4KICECSQ .

ny4i commented 4 years ago

I re-read my message and other than "on the RAM..." being changed to "not on RAM...", no typo.so I hope that was what you meant.

Bottom line was that headless as checked in did not work. I had to remove base_map in the draw_map call.

I am working on a PULL request and will send up my changes later today.

I also had to change how create_images was called as it was not setting the last_qso_time to the result of the function.

I added code to ensure the directory for the HTML files exists. if not, I create it. If the RAM disk init is running, then that will not be necessary but it is a good validation.

My application is that I need headless for HTML and the dashboard for a local display so I am plan to run both on the same Pi along with the collector. I had these both in dashboard when I first wrote the png generation code, but they were broken out to modularize it. I see the point but double the database reads.

Thanks, Tom

ke0pci commented 4 years ago

Tom,

The ramdisk path changed based on the preferred instructions. I apparently did not read through the headless.py file when I made that update. I am looking forward to seeing your changes and will scan all files in my future branch changes as a way of improving.

73, John

From the global headquarters of amateur radio station KE0PCI

On Fri, Jan 17, 2020 at 10:25 AM Tom Schaefer notifications@github.com wrote:

I re-read my message and other than "on the RAM..." being changed to "not on RAM...", no typo.so I hope that was what you meant.

Bottom line was that headless as checked in did not work. I had to remove base_map in the draw_map call.

I am working on a PULL request and will send up my changes later today.

I also had to change how create_images was called as it was not setting the last_qso_time to the result of the function.

I added code to ensure the directory for the HTML files exists. if not, I create it. If the RAM disk init is running, then that will not be necessary but it is a good validation.

My application is that I need headless for HTML and the dashboard for a local display so I am plan to run both on the same Pi along with the collector. I had these both in dashboard when I first wrote the png generation code, but they were broken out to modularize it�. I see the point but double the database reads.

Thanks, Tom

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/n1kdo/n1mm_view/issues/27?email_source=notifications&email_token=AME3DXE25FX6VZDSKORGOQTQ6HSZ7A5CNFSM4KICECS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJIMR5A#issuecomment-575719668, or unsubscribe https://github.com/notifications/unsubscribe-auth/AME3DXFIODOZ4EBUBMU3VXDQ6HSZ7ANCNFSM4KICECSQ .

ny4i commented 4 years ago

No problem. I only discovered that because I did not realize there was a new INIT to build the RAM disk at the start. We should put a comment in config.py that the volume should be /mnt/ramdisk/ to match up with the Ramdisk init.

When I ran headless, it received errors writing since the directories were not there (I had not run the script).

I think I still prefer the script controlling its own destiny so to speak and creating the directories instead of the INIT script but I understand the purpose.

Should be tonight for the changes as have to take out my customizations for my club and location and some debug calls.

Tom Principal Solutions Architect Better Software Solutions, Inc. 727-437-2771

On Jan 17, 2020, at 12:31 PM, ke0pci notifications@github.com wrote:

Tom,

The ramdisk path changed based on the preferred instructions. I apparently did not read through the headless.py file when I made that update. I am looking forward to seeing your changes and will scan all files in my future branch changes as a way of improving.

73, John

From the global headquarters of amateur radio station KE0PCI

On Fri, Jan 17, 2020 at 10:25 AM Tom Schaefer notifications@github.com wrote:

I re-read my message and other than "on the RAM..." being changed to "not on RAM...", no typo.so I hope that was what you meant.

Bottom line was that headless as checked in did not work. I had to remove base_map in the draw_map call.

I am working on a PULL request and will send up my changes later today.

I also had to change how create_images was called as it was not setting the last_qso_time to the result of the function.

I added code to ensure the directory for the HTML files exists. if not, I create it. If the RAM disk init is running, then that will not be necessary but it is a good validation.

My application is that I need headless for HTML and the dashboard for a local display so I am plan to run both on the same Pi along with the collector. I had these both in dashboard when I first wrote the png generation code, but they were broken out to modularize it�. I see the point but double the database reads.

Thanks, Tom

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/n1kdo/n1mm_view/issues/27?email_source=notifications&email_token=AME3DXE25FX6VZDSKORGOQTQ6HSZ7A5CNFSM4KICECS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJIMR5A#issuecomment-575719668, or unsubscribe https://github.com/notifications/unsubscribe-auth/AME3DXFIODOZ4EBUBMU3VXDQ6HSZ7ANCNFSM4KICECSQ .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/n1kdo/n1mm_view/issues/27?email_source=notifications&email_token=AC6TWSSPMQRY7Z44P5B7IGLQ6HTPDA5CNFSM4KICECS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJINA2Q#issuecomment-575721578, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC6TWSRIB2M4LPVMKRROW7DQ6HTPDANCNFSM4KICECSQ.

ny4i commented 4 years ago

I added a pull request with my changes.

Tom Principal Solutions Architect Better Software Solutions, Inc. 727-437-2771

On Jan 17, 2020, at 12:31 PM, ke0pci notifications@github.com wrote:

Tom,

The ramdisk path changed based on the preferred instructions. I apparently did not read through the headless.py file when I made that update. I am looking forward to seeing your changes and will scan all files in my future branch changes as a way of improving.

73, John

From the global headquarters of amateur radio station KE0PCI

On Fri, Jan 17, 2020 at 10:25 AM Tom Schaefer notifications@github.com wrote:

I re-read my message and other than "on the RAM..." being changed to "not on RAM...", no typo.so I hope that was what you meant.

Bottom line was that headless as checked in did not work. I had to remove base_map in the draw_map call.

I am working on a PULL request and will send up my changes later today.

I also had to change how create_images was called as it was not setting the last_qso_time to the result of the function.

I added code to ensure the directory for the HTML files exists. if not, I create it. If the RAM disk init is running, then that will not be necessary but it is a good validation.

My application is that I need headless for HTML and the dashboard for a local display so I am plan to run both on the same Pi along with the collector. I had these both in dashboard when I first wrote the png generation code, but they were broken out to modularize it�. I see the point but double the database reads.

Thanks, Tom

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/n1kdo/n1mm_view/issues/27?email_source=notifications&email_token=AME3DXE25FX6VZDSKORGOQTQ6HSZ7A5CNFSM4KICECS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJIMR5A#issuecomment-575719668, or unsubscribe https://github.com/notifications/unsubscribe-auth/AME3DXFIODOZ4EBUBMU3VXDQ6HSZ7ANCNFSM4KICECSQ .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/n1kdo/n1mm_view/issues/27?email_source=notifications&email_token=AC6TWSSPMQRY7Z44P5B7IGLQ6HTPDA5CNFSM4KICECS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJINA2Q#issuecomment-575721578, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC6TWSRIB2M4LPVMKRROW7DQ6HTPDANCNFSM4KICECSQ.