Skip to content

feat: implement tasks #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 26 commits into from
Mar 29, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
92c2d78
feat: tasks module
pr-Mais Jan 20, 2023
375b1e0
tasks using callable handler
pr-Mais Jan 20, 2023
0ae2b03
docs: on_task_dipached desc
pr-Mais Jan 20, 2023
cc67a74
feat: set required api
pr-Mais Jan 20, 2023
4b9b56f
fix: required apis
pr-Mais Jan 20, 2023
7de6439
fix: skip required apis if it doesn't exist
pr-Mais Jan 20, 2023
f949ecd
fix: required api type check
pr-Mais Jan 20, 2023
8870543
fix: spelling
pr-Mais Jan 20, 2023
e0ffd77
feat: tasks module sample
pr-Mais Jan 23, 2023
e65957a
Merge branch '8-storage' of https://github.com/invertase/firebase-fun…
Salakar Jan 23, 2023
bdad636
update venv
Salakar Jan 26, 2023
4c245bf
refactor: finalize and add missing options classes and manifest conve…
Salakar Jan 26, 2023
71f05fb
Merge branch '8-storage' of https://github.com/invertase/firebase-fun…
Salakar Jan 26, 2023
f69c8cf
Merge branch '8-storage' of https://github.com/invertase/firebase-fun…
Salakar Jan 26, 2023
d1bb30f
fix: tasks example
pr-Mais Jan 27, 2023
94ca397
ocs: added README and comments on the tasks sample
pr-Mais Jan 27, 2023
a067a91
fix: readme
pr-Mais Jan 27, 2023
da414f4
-
Salakar Feb 1, 2023
bf3ebdf
Merge branch 'main' of https://github.com/invertase/firebase-function…
Salakar Feb 1, 2023
f1c2c92
Merge branch 'types-readability' of https://github.com/invertase/fire…
Salakar Mar 20, 2023
80d4116
-
Salakar Mar 20, 2023
cd2f3e0
test(tasks): add unit tests
Salakar Mar 20, 2023
1ecf6ab
refactor: rename to tasks_fn
Salakar Mar 20, 2023
01b392b
Merge branch 'main' of https://github.com/invertase/firebase-function…
Salakar Mar 23, 2023
3ad5130
fix: merge APIs should merge reasons
Salakar Mar 27, 2023
28bf828
chore: update tasks example
Salakar Mar 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: rename to tasks_fn
  • Loading branch information
Salakar committed Mar 20, 2023
commit 1ecf6ab65d64fbcc11def5f5e988929ee01a24a7
6 changes: 3 additions & 3 deletions samples/basic_tasks/functions/main.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
"""Firebase Cloud Functions for Tasks."""
from firebase_admin import initialize_app
from firebase_functions import tasks
from firebase_functions import tasks_fn
from firebase_functions.options import SupportedRegion, RetryConfig, RateLimits

app = initialize_app()


# Once this function is deployed, a Task Queue will be created with the name
# `ontaskdispatchedexample`.
@tasks.on_task_dispatched(
@tasks_fn.on_task_dispatched(
retry_config=RetryConfig(max_attempts=5),
rate_limits=RateLimits(max_concurrent_dispatches=10),
region=SupportedRegion.US_CENTRAL1,
)
def ontaskdispatchedexample(req: tasks.CallableRequest):
def ontaskdispatchedexample(req: tasks_fn.CallableRequest):
"""
The endpoint which will be executed by the enqueued task.
"""
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/test_tasks_fn.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from unittest.mock import MagicMock
from flask import Flask, Request
from werkzeug.test import EnvironBuilder
from firebase_functions.tasks import on_task_dispatched, CallableRequest
from firebase_functions.tasks_fn import on_task_dispatched, CallableRequest


class TestTasks(unittest.TestCase):
Expand Down