Skip to content

Commit 1ecf6ab

Browse files
committed
refactor: rename to tasks_fn
1 parent cd2f3e0 commit 1ecf6ab

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

samples/basic_tasks/functions/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
"""Firebase Cloud Functions for Tasks."""
22
from firebase_admin import initialize_app
3-
from firebase_functions import tasks
3+
from firebase_functions import tasks_fn
44
from firebase_functions.options import SupportedRegion, RetryConfig, RateLimits
55

66
app = initialize_app()
77

88

99
# Once this function is deployed, a Task Queue will be created with the name
1010
# `ontaskdispatchedexample`.
11-
@tasks.on_task_dispatched(
11+
@tasks_fn.on_task_dispatched(
1212
retry_config=RetryConfig(max_attempts=5),
1313
rate_limits=RateLimits(max_concurrent_dispatches=10),
1414
region=SupportedRegion.US_CENTRAL1,
1515
)
16-
def ontaskdispatchedexample(req: tasks.CallableRequest):
16+
def ontaskdispatchedexample(req: tasks_fn.CallableRequest):
1717
"""
1818
The endpoint which will be executed by the enqueued task.
1919
"""
File renamed without changes.

tests/test_tasks_fn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from unittest.mock import MagicMock
1818
from flask import Flask, Request
1919
from werkzeug.test import EnvironBuilder
20-
from firebase_functions.tasks import on_task_dispatched, CallableRequest
20+
from firebase_functions.tasks_fn import on_task_dispatched, CallableRequest
2121

2222

2323
class TestTasks(unittest.TestCase):

0 commit comments

Comments
 (0)