Skip to content

Commit

Permalink
add log to monitor APNS
Browse files Browse the repository at this point in the history
  • Loading branch information
duyetpt committed Nov 29, 2015
1 parent ac81703 commit d16c7c9
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import com.relayrides.pushy.apns.PushManager;
import com.relayrides.pushy.apns.PushManagerConfiguration;
import com.relayrides.pushy.apns.util.ApnsPayloadBuilder;
import com.relayrides.pushy.apns.util.MalformedTokenStringException;
import com.relayrides.pushy.apns.util.SSLContextUtil;
import com.relayrides.pushy.apns.util.SimpleApnsPushNotification;
import com.relayrides.pushy.apns.util.TokenUtil;
Expand All @@ -19,7 +18,6 @@
import com.vn.dailycookapp.utils.lang.Language;
import java.io.File;
import java.util.List;
import org.dao.DAOException;
import org.dao.DeviceTokenDAO;
import org.entity.DeviceToken;
import org.entity.Notification;
Expand Down Expand Up @@ -92,11 +90,12 @@ public void push(Notification noti) {

for (DeviceToken token : deviceTokens) {
logger.info("APNS-" + token.getDeviceToken());
logger.info("PushManager is shutdown - " + pushManager.isShutDown());
pushManager.getQueue().put(new SimpleApnsPushNotification(TokenUtil.tokenStringToByteArray(token.getDeviceToken()), payload));
}

pushManager.requestExpiredTokens();
} catch (DAOException | InterruptedException | MalformedTokenStringException ex) {
} catch (Exception ex) {
logger.error("push notification error", ex);
}
}
Expand Down

0 comments on commit d16c7c9

Please sign in to comment.