jacksonargo / cloudburrito

A slack app to download burritos from the cloud.
https://cloudburrito.jacksonargo.com
MIT License
0 stars 1 forks source link

Can be waiting for a burrito and be assigned to deliver a burrito #13

Closed jacksonargo closed 7 years ago

jacksonargo commented 7 years ago

Someone was assigned to deliver a burrito who was waiting to receive a burrito. This goes against CBTP.

2.3.3 :006 > Patron.find 'U1HD672BE'
 => #<Patron _id: U1HD672BE, created_at: 2017-04-25 08:02:36 UTC, updated_at: 2017-05-23 04:07:08 UTC, pool_id: BSON::ObjectId('591c10becd3e003c5a2dfa83'), active: true, active_at: 2017-05-23 04:07:08 UTC, inactive_at: 2017-04-27 00:21:28 UTC, force_not_greedy: false, force_not_sleepy: false, user_token: "5prffiek5wldhbr639lq14bd4qima9dvavy76rsfwj3knxf15z", sleepy_time: 3600, greedy_time: 3600, slack_user: true, slack_user_id: "U1HD672BE"> 
2.3.3 :007 > Patron.find('U1HD672BE').on_delivery?
 => true 
2.3.3 :008 > Patron.find('U1HD672BE').waiting?
 => true 
jacksonargo commented 7 years ago

Fixed in commit bf29e4652c66c6fda9705f1dabf8b1cf1578aca3.