Fix issue with RAM consumption during expiry maintenance

Currently, we SELECT * from the pastes table, when all we need is the pid and the expiry.
This causes elevated RAM consumption by Stikked since it has to pull in paste bodies as well.
Make the cron only pull in pid and expiry.
This commit is contained in:
David Ibarra 2015-09-16 18:51:26 -05:00
parent 6026180fa9
commit cf6b71cd4d

View File

@ -901,6 +901,7 @@ class Pastes extends CI_Model
function cron()
{
$now = now();
$this->db->select('pid,expire');
$this->db->where('toexpire', '1');
$query = $this->db->get('pastes');
foreach ($query->result_array() as $row)