NetTalk Central

Author Topic: Users getting the wrong reports  (Read 3427 times)

Matthew51

  • Full Member
  • ***
  • Posts: 152
    • View Profile
    • Email
Users getting the wrong reports
« on: May 13, 2020, 02:45:10 PM »
NT: 11.35
Clarion: 11

This has been an issue for a while now, and is becoming more common as my server bet more busy. It can generate 300 or more reports per day, and will normally have 20+ pdf files in the reports folder that users haven't downloaded.

My guess is that the pdf generator won't over write a file if it already exists. I don't have much to go on as the information that gets to me is very little, normally just a screenshot of the offending report. I did put in code to make sure the important session values didn't get changed, and after a few months of no issues with incorrect session values I removed the code.

Even with 90,000 possible file names the chances of a collision is about 7% per day.

I have 2 suggestions
1: Let us choose how often to delete reports. If a user hasn't downloaded it in 10 min the are very unlikely to.
2: Add letters to the random file name. This should push the chance of a collision back to acceptable levels, even as my user base grows.

Thank you
Mathew
Contractor with 10+ years of NetTalk experience looking for work.
www.linkedin.com/in/matthew-leavitt
BisWare.ca
Check out my free EasyTime Template

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11251
    • View Profile
Re: Users getting the wrong reports
« Reply #1 on: May 16, 2020, 10:24:06 PM »
Hi Matthew,

I've tweaked it for the next build to generate a more random name.

>> 1: Let us choose how often to delete reports. If a user hasn't downloaded it in 10 min the are very unlikely to.

you're already free to do this.
Use the DIRECTORY command to get the date/time of a report creation, and delete as often as you like.

cheers
Bruce