Skip to content

Commit

Permalink
Move celery to tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
mtomilov committed Jan 30, 2025
1 parent 25e83dd commit 896eabb
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion h/cli/commands/celery.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import click

from h.celery import start
from h.tasks.celery import start


@click.command(
Expand Down
2 changes: 1 addition & 1 deletion h/tasks/annotations.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from h.celery import celery, get_task_logger
from h.db.types import URLSafeUUID
from h.models import Annotation
from h.services.annotation_write import AnnotationWriteService
from h.tasks.celery import celery, get_task_logger

log = get_task_logger(__name__)

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion h/tasks/cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from sqlalchemy import func, select

from h import models
from h.celery import celery, get_task_logger
from h.tasks.celery import celery, get_task_logger

log = get_task_logger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion h/tasks/indexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import newrelic
from celery import Task

from h.celery import celery, get_task_logger
from h.services import AnnotationSyncService
from h.tasks.celery import celery, get_task_logger

log = get_task_logger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion h/tasks/job_queue.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from h.celery import celery, get_task_logger
from h.tasks.celery import celery, get_task_logger

log = get_task_logger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion h/tasks/mailer.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import pyramid_mailer
import pyramid_mailer.message

from h.celery import celery, get_task_logger
from h.tasks.celery import celery, get_task_logger

__all__ = ("send",)

Expand Down
2 changes: 1 addition & 1 deletion h/tasks/url_migration.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from h.celery import celery
from h.tasks.celery import celery


@celery.task(rate_limit="10/m")
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/h/celery_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from billiard.einfo import ExceptionInfo

from h import celery
from h.tasks import celery


class TestCelery:
Expand Down

0 comments on commit 896eabb

Please sign in to comment.