Is it possible to invoke a taskqueue with a parameter of a different type then String? My code currently looks like this but the code in the queue is never reached: (Playframework coding)
public static void addOrUpdateShops(byte[] xmlFile) {
checkUserExists();
QueueFactory.getDefaultQueue().add(withUrl("/DataTransferController/addOrUpdateShopz").param( "xmlFile", xmlFile).method(TaskOptions.Method.POST));
renderText("Added to queue");
}
public static void addOrUpdateShopz(byte[] xmlFile) throws Exception {
Logger.debug("Running queue task (addOrUpdateShopszz)");
ShopModelUtilities.addShops(xmlFile);
}
Thx
Yes you can. Use TaskOptions.Builder.withPayload(byte[], String) or on existing TaskOptions.payload(byte[], String).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With