This commit is contained in:
parent
19e44b60f0
commit
2fcd542194
@ -111,7 +111,7 @@ func main() {
|
|||||||
for d := range msgs {
|
for d := range msgs {
|
||||||
msg, err := amqp.Deserialize(d.Body)
|
msg, err := amqp.Deserialize(d.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Log("json error:", err)
|
logger.Log("json error: %v", err)
|
||||||
d.Reject(false) // FIXME: how to handle erros in queue...????
|
d.Reject(false) // FIXME: how to handle erros in queue...????
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@ -128,10 +128,10 @@ func main() {
|
|||||||
// FIXME CHECK if basket exists
|
// FIXME CHECK if basket exists
|
||||||
_, err := basket.Get(basketID)
|
_, err := basket.Get(basketID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Log("Basket#%s not found. Creating...", basketID)
|
logger.Log("Basket#:%s not found. Creating...", basketID)
|
||||||
err := basket.Create(basketID)
|
err := basket.Create(basketID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Log("Creating basket error: %s", err)
|
logger.Log("Creating basket error: %v", err)
|
||||||
d.Reject(false)
|
d.Reject(false)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user