Skip to content

Commit c247570

Browse files
committed
Tag the repeat URL batches
1 parent e032002 commit c247570

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from pydantic import BaseModel
2626
from sqlalchemy import select, update
2727
import sentry_sdk
28-
from .models import Job, Batch, URL, RepeatURL
28+
from .models import BatchTag, Job, Batch, URL, RepeatURL
2929
from .routes import load_routes
3030

3131
sentry_sdk.init(
@@ -215,7 +215,9 @@ async def repeat_url_worker():
215215
created_at + datetime.timedelta(minutes=30) < curtime
216216
):
217217
async with session.begin_nested():
218-
batch = Batch()
218+
batch = Batch(
219+
tags=await BatchTag.resolve_list({"repeat-url-batch"})
220+
)
219221
created_at = curtime
220222
session.add(batch)
221223
queued.append(

0 commit comments

Comments
 (0)