Created
April 27, 2016 20:29
-
-
Save solepixel/116b8ceefb87248ebbae2211601b4861 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function sync_active() { | |
if( get_transient( 'rets_data_sync_active' ) ) | |
return; | |
set_transient( 'rets_data_sync_active', 'PAUSE', HOUR_IN_SECONDS * 4 ); | |
global $rets_sync_db; | |
$rets_sync_db->add_filter( 'field_L_Status', 'Active' ); | |
$listings = $rets_sync_db->get_listings(); | |
$counter = 0; | |
foreach ( $listings as $listing ) { | |
wp_queue( new RETS_Sync_Listing_Job( $listing->id ) ); | |
$counter++; | |
} | |
$this->processor->dispatch(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment