netcarver

PW-Moderators
  • Content count

    1,337
  • Joined

  • Last visited

  • Days Won

    27

netcarver last won the day on October 17 2016

netcarver had the most liked content!

Community Reputation

1,863 Excellent

About netcarver

  • Rank
    Code Monkey

Contact Methods

  • Website URL
    https://www.youtube.com/watch?v=kWrjYdD0Tg0

Profile Information

  • Gender
    Male
  • Location
    UK

Recent Profile Visitors

11,140 profile views
  1. @helmut2509 Ok. I just read the documentation again, and if you don't need an id for the "new" action, you should be able to use... new regex:^edit/[0-9]+ Steve
  2. @helmut2509 Looking at what I wrote again, if you don't require the "new" segment to have an ID, just leave it as "regex:^new".
  3. Hello, I'm a little confused by your description of the problem, but I don't think you have your URL segments set up correctly. In what follows, I am assuming you have edited the URL tab of the template for your page to turn on URL segment processing and you have something entered in the "Which URL segments do you want to allow?" field. I'm guessing that you want to have the first segment be an action - either edit or new - and the second segment to be a numeric id. If that is the case and you want PW to enforce the first segment to be either 'edit' or 'new' then you need to use a regular expression as documented here to match the actual URL you are supplying. More specifically, could you try... regex:^new/[0-9]+ regex:^edit/[0-9]+ Another approach may be to leave that field totally blank and do all the checking yourself, in which case I think macrura's code should work.
  4. BTW, if you have GhostScript installed on your server, you can use it to compress PDFs locally using a command-line call... gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=out.pdf in.pdf Source: SuperUser.com (See 2nd answer.)
  5. Hi @matjazp, How did you happen to find out about the compression API at labstack? When I look at the site, there seems to be zero documentation about that feature. Regards,
  6. Hi @Andreas Augustin Thank you for the interest in this module - which is in need of an update. I've been contacted by a couple of other interested parties (see here), and I will be working on an update to this module soon. Personally, I've always preferred using an SSH tunnel to connect to remote redis server instances, but I will certainly take a look at what you've done regarding native authentication suppport. Best wishes, Steve
  7. You may well be right, Guy. You know your application better than anyone else. If you design your cron script to process a small part of the larger picture on each invocation, there's no reason that an invocation has to process the entire input set in a single run. Also, as you already have an exact record of the previous input set in the form of the previously imported CSV file, it should be fairly easy to compare the newly generated file you want to import into PW with the previous one in order to quickly generate your addition, deletion and change lines. This approach does work if the external data set is the master copy and is in sync with any sales that are made through the PW site. If stock levels are independently tracked in PW and/or take some time to back propagate the external data source, then this pre-processing approach can't be used for updates, just for additions and deletions. Also, if a large percentage of the data set is different between imports, then it may not gain you anything to pre-process. Best wishes
  8. Hello Guy, I'd be tempted to look at running your script directly from a cron task, rather than using a trigger URL. Is there a particular reason you couldn't take the cron route? Also, with that many products, it might be beneficial to pre-process the data so you only have PW process lines from the CSV file that represent changes from the previous import - ie, products that have been added, removed or updated. I suspect many of your 50000 line file will be the same between runs of your update script, but I could be wrong as your situation may be different and your data might be changing more rapidly than I've previously experienced (for example for very fluid stock levels.)
  9. @Karl_T, @seddass you should both have collaborator invitations in a moment or two.
  10. @seddass, @Karl_T I'm a little out of the loop regarding Redis, at the moment, but I like the idea of collaborating on this. As I have the original repo on github, how about I add you both as collaborators, and we can make this a more community oriented effort?
  11. My module was very experimental. Very happy for it to have a successor
  12. <moderator hat: on> Hi everyone, Just want to point out that discussion of Ben's module really belongs in its own thread and not under this one - which is specifically for discussing pwFoo's module. If anyone wants to discuss a possible merger between the two modules, please start a new thread to discuss the possibility and then post a single pointer to the new thread here and in Ben's module's thread. Many thanks! <moderator hat: off>
  13. Module

    Hi Adrian, Sorry, I meant site/assets/sessions/ and the tracy* files within that. At one point there were thousands of megabyte-size files in there. The site this happened on is running Tracy 3.5.5 on PW 3.0.42. OS: Arch linux. PHP: 7.1 Irony of moment: I disabled Tracy, then I deleted the tracy* files AND recreated the backup set, deleting the differentials. I've been back into the admin area and tried re-enabling Tracy, but I'm not seeing the files being created now - suggesting it might have been from an older version of the module (this is a site I use to experiment with new PW stuff, so it has seen multiple revisions of Tracy installed over the months.) If the issue recurs I shall, of course, let you know more. Regards, Steve
  14. Module

    Hi @adrian Perhaps slightly off topic but... I'd like to report that I had a recent differential backup that was growing rather fast, and it turned out to be tracy files in the session directory of the site. I've since excluded the offending session directory from the backup (shouldn't have been there in the first place) but it might be worth noting that the total size of all the tracy sessions files had grown into the 10s of GB. I wonder if there is any practical way Tracy could be made to cull its old session files? Best wishes, Steve
  15. As long as Tracy Deadbugger is not installed. Or any of my modules.