1. 23 Apr, 2015 1 commit
    • Nigel Cunningham's avatar
      (Bug785472) Remove unneeded raise_memory_limit calls · 039564a5
      Nigel Cunningham authored
      On the basis of my profiling and testing over the last week,
      all of the scripts affected by this patch don't need their
      raise_memory_limit calls. Ensure_sanity currently sets the
      memory limit to 128MB, which has been seen to be more than
      sufficient for each of these use cases.
      
      Tests have involved at least 1000 records being imported in
      each case, and sometimes as many as 20,000. I would have
      liked to have tested with some really full profiles (eg
      lots of pictures and content), but am satisfied that there's
      enough margin to cover those cases. In any case, such files
      are often handled using external apps and therefore won't
      be counted toward PHP's memory use anyway. Finally, the
      limit can easily be increased by the user if necessary for
      a particular case.
      
      Change-Id: Ifecc83fd47da51268bae6cbd6960735eb91f9403
      Signed-off-by: default avatarNigel Cunningham <nigelc@catalyst-au.net>
      039564a5
  2. 04 Jun, 2014 1 commit
  3. 14 Oct, 2013 1 commit
  4. 15 Feb, 2012 1 commit
    • Richard Mansfield's avatar
      Try to remove lock when exception thrown in cron function (bug #685640) · ae76bab0
      Richard Mansfield authored
      If a cron function causes an exception for whatever reason, then the
      cron will stop, but the lock isn't removed. The job then isn't tried
      again for another 24 hours.
      
      Instead we should try to set the next run time and remove the lock.
      Cron functions that run frequently, but fail due to some temporary
      problem, will not be forced to stop for 24 hours.  On the other hand,
      very frequent cron functions that throw exceptions on every run will
      be spammy.
      
      Obviously, this change has no effect on cron functions that fail due
      to script timeouts, out-of-memory errors, or which exit for any other
      reason.
      
      Change-Id: I3bfe08c2ebba62cbd82045e66438a6442d1f1fe8
      Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
      ae76bab0
  5. 10 Jan, 2012 1 commit
    • Richard Mansfield's avatar
      Change severity of logged messages in cron.php · e2e9ad9b
      Richard Mansfield authored
      The status messages in cron.php are logged at the debug level, which
      makes it difficult to separate them from some of the more trivial
      messages that we may want to output - for example, when deleting old
      cached files from disk.  It's more helpful to log the status messages
      at the info level instead, so that people can add log_debug calls more
      freely.
      
      Change-Id: Ibdca949d770b84ff910f7aa6a8446c001ed5bbc6
      Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
      e2e9ad9b
  6. 27 Nov, 2011 1 commit
    • Richard Mansfield's avatar
      Fix race condition in cron (bug #891170) · 93639aac
      Richard Mansfield authored
      When cron finds a function with a stale (day-old) lock, just remove
      the lock and give up rather than trying to execute the function again.
      It's already pretty late, and waiting another minute for the next cron
      to start won't make a difference.
      
      This should avoid the case where two copies of cron both find the stale
      lock at the same time, and restart simultaneously.  It won't matter if
      cron_lock fails to get a $started value because the row has been
      deleted: the next instance of cron to run will be able to insert the
      row.
      
      Change-Id: I025aaf89d64f47466f1ba4c5bb8178317277ec2c
      Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
      93639aac
  7. 24 Aug, 2011 1 commit
  8. 13 May, 2011 1 commit
  9. 08 Dec, 2010 1 commit
  10. 05 Dec, 2010 1 commit
  11. 01 Nov, 2010 1 commit
  12. 25 Oct, 2010 1 commit
  13. 01 Oct, 2010 2 commits
  14. 16 Sep, 2009 1 commit
    • Richard Mansfield's avatar
      make cron maxrunage configurable · 4044df8b
      Richard Mansfield authored
      This is essential for server configurations that do not (or cannot) run
      the cron.php every minute.  This change:
      
      + makes the maxrunage configurable
      + makes the configuration a default of 300 (same as current code setting)
      (cherry picked from commit aa5618fb4d7bb22a77b813a735f1ae40f096a33a)
      
      Conflicts:
      
      	htdocs/config-defaults.php
      	htdocs/lib/cron.php
      4044df8b
  15. 15 Sep, 2009 1 commit
  16. 23 Jul, 2009 1 commit
  17. 27 May, 2009 1 commit
  18. 21 Apr, 2009 1 commit
  19. 25 Nov, 2008 1 commit
  20. 18 Nov, 2008 1 commit
  21. 29 Aug, 2008 1 commit
    • Penny Leach's avatar
      ROUGH AS GUTS first commit of portfolio importer · 9dda41d0
      Penny Leach authored
      still to do:
      
      - cron processing is completely untested
      - i would like to split out the import table based on the transport:
        import_queue.host and token should go into a import_queue_mnet table
      - it's possibly worth thinking about making import a proper plugin type.
        not sure about the effect this has on the import transport
        framework...  it might be possible to have both import and
        import transport plugintypes but that might be too heavy
      - at the very least if we split out import_queue.host and token into an
        mnet table it will pave the way for a better refactor laterz.
      - i would still really like to improve the mnet namespacing but that
        might be plausible at this point.
      - need to write docs about arguments and return types
      - i want to change the content_ready arguments to not include
        $filesmanifest as that is dependent on format being file - it may
        be actually better to dispatch somewhere else based on $format and
        then just have a generic $data which would be $filesmanifest for files
        and then something else for something like LEAP or maharanative or
        whatever, as this is checked in the importer, not not the
        importertransport.
      9dda41d0
  22. 09 Mar, 2008 1 commit
  23. 16 Feb, 2008 3 commits
  24. 04 Dec, 2007 1 commit
  25. 14 Nov, 2007 1 commit
  26. 12 Apr, 2007 1 commit
  27. 24 Jan, 2007 1 commit
  28. 14 Dec, 2006 2 commits
  29. 04 Dec, 2006 1 commit
  30. 22 Nov, 2006 1 commit
  31. 14 Nov, 2006 1 commit
  32. 31 Oct, 2006 1 commit
  33. 30 Oct, 2006 1 commit