| 160 | }; |
| 161 | |
| 162 | work_item parse_message(pubsub::Message const& m) { |
| 163 | auto attributes = m.attributes(); |
| 164 | return work_item{ |
| 165 | attributes.at("bucket"), |
| 166 | attributes.at("prefix"), |
| 167 | std::stoll(attributes.at("object_count")), |
| 168 | attributes.at("use_hash_prefix") == "true", |
| 169 | }; |
| 170 | } |
| 171 | |
| 172 | pubsub::Message format_work_item(work_item wi) { |
| 173 | return pubsub::MessageBuilder() |