1 | <?php |
||
22 | class Nexcessnet_Turpentine_Model_Observer_Cron extends Varien_Event_Observer { |
||
|
|||
23 | |||
24 | /** |
||
25 | * Max time to crawl URLs if max_execution_time is 0 (unlimited) in seconds |
||
26 | * |
||
27 | * @var int |
||
28 | */ |
||
29 | const MAX_CRAWL_TIME = 300; |
||
30 | |||
31 | /** |
||
32 | * Amount of time of execution time to leave for other cron processes |
||
33 | * |
||
34 | * @var int |
||
35 | */ |
||
36 | const EXEC_TIME_BUFFER = 15; |
||
37 | |||
38 | /** |
||
39 | * Crawl available URLs in the queue until we get close to max_execution_time |
||
40 | * (up to MAX_CRAWL_TIME) |
||
41 | * |
||
42 | * @param Varien_Object $eventObject |
||
43 | * @return null |
||
44 | */ |
||
45 | public function crawlUrls($eventObject) { |
||
78 | |||
79 | /** |
||
80 | * Queue all URLs |
||
81 | * |
||
82 | * @param Varien_Object $eventObject |
||
83 | * @return null |
||
84 | */ |
||
85 | public function queueAllUrls($eventObject) { |
||
91 | |||
92 | /** |
||
93 | * Request a single URL, returns whether the request was successful or not |
||
94 | * |
||
95 | * @param string $url |
||
96 | * @return bool |
||
97 | */ |
||
98 | protected function _crawlUrl($url) { |
||
112 | } |
||
113 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.