Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
13 lines
280 B
Python
13 lines
280 B
Python
"""Job id generation."""
|
|
|
|
|
|
class IdGenerator:
|
|
"""Hands out ids like j-0a3, one per accepted job; an id is never handed out twice."""
|
|
|
|
def __init__(self, start=0):
|
|
self._seq = start
|
|
|
|
def next_id(self):
|
|
self._seq += 1
|
|
return "j-%03x" % self._seq
|