Make configurable to number of events stored in project activities

This commit is contained in:
Frederic Guillot
2017-10-19 10:50:36 -07:00
parent e7f795a63e
commit d3b8fbfa28
4 changed files with 12 additions and 8 deletions

View File

@@ -20,13 +20,6 @@ class ProjectActivityModel extends Base
*/
const TABLE = 'project_activities';
/**
* Maximum number of events
*
* @var integer
*/
const MAX_EVENTS = 1000;
/**
* Add a new event for the project
*
@@ -49,7 +42,7 @@ class ProjectActivityModel extends Base
'data' => json_encode($data),
);
$this->cleanup(self::MAX_EVENTS - 1);
$this->cleanup(PROJECT_ACTIVITIES_MAX_EVENTS - 1);
return $this->db->table(self::TABLE)->insert($values);
}