Skip to content

Commit d420358

Browse files
committed
Pad groups with zero in kafka
1 parent 5e20c57 commit d420358

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/background_tasks/kafka_batch_update_points_task.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def run
2727
Rails.logger.info("Publishing points for user #{user.id}")
2828
progress = points_by_group.map do |group_name, awareded_points|
2929
max_points = available_points[group_name] || 0
30-
stupid_name = "osa#{group_name.tr('^0-9', '')}"
30+
stupid_name = "osa#{group_name.tr('^0-9', '').rjust(2, "0")}"
3131
{
3232
group: stupid_name,
3333
n_points: awareded_points,

0 commit comments

Comments
 (0)