newbie LAC Posted December 6, 2019 Posted December 6, 2019 Hello, system/Task/Task.php if ( method_exists( $extensions[ $key ], 'preQueueData' ) ) { $class = new $extensions[ $key ]; $data = $class->preQueueData( $data ); if ( $data === NULL ) { return; } } Based on DocBlock the method preQueueData() should return an array /** * Parse data before queuing * * @param array $data * @return array */ public function preQueueData( $data ) Ok. You allow to return NULL as you do in some background tasks. But a queue will not be run (added into core_queue table) and the method postComplete() will not be executed. Examples - applications/core/extensions/core/Queue/RebuildContainerCounts.php - applications/core/extensions/core/Queue/RebuildItemCounts.php public function postComplete( $data ) { /* Clear guest cache */ \IPS\Db::i()->delete( 'core_cache' ); } - applications/gallery/extensions/core/Queue/CleanUpGalleryImages.php public function postComplete( $data ) { \IPS\Db::i()->query( "ALTER TABLE `" . \IPS\Db::i()->prefix . "gallery_images` DROP COLUMN image_thumb_file_name, DROP COLUMN image_medium_file_name" ); }
Daniel F Posted December 6, 2019 Posted December 6, 2019 Thanks, I have filled an internal bug report.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.