File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
samples/basic_tasks/functions Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
"""Firebase Cloud Functions for Tasks."""
2
2
from firebase_admin import initialize_app
3
- from firebase_functions import tasks
3
+ from firebase_functions import tasks_fn
4
4
from firebase_functions .options import SupportedRegion , RetryConfig , RateLimits
5
5
6
6
app = initialize_app ()
7
7
8
8
9
9
# Once this function is deployed, a Task Queue will be created with the name
10
10
# `ontaskdispatchedexample`.
11
- @tasks .on_task_dispatched (
11
+ @tasks_fn .on_task_dispatched (
12
12
retry_config = RetryConfig (max_attempts = 5 ),
13
13
rate_limits = RateLimits (max_concurrent_dispatches = 10 ),
14
14
region = SupportedRegion .US_CENTRAL1 ,
15
15
)
16
- def ontaskdispatchedexample (req : tasks .CallableRequest ):
16
+ def ontaskdispatchedexample (req : tasks_fn .CallableRequest ):
17
17
"""
18
18
The endpoint which will be executed by the enqueued task.
19
19
"""
File renamed without changes.
Original file line number Diff line number Diff line change 17
17
from unittest .mock import MagicMock
18
18
from flask import Flask , Request
19
19
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
21
21
22
22
23
23
class TestTasks (unittest .TestCase ):
You can’t perform that action at this time.
0 commit comments