-
Notifications
You must be signed in to change notification settings - Fork 343
feat(functions): Enable Cloud Task Queue Emulator support #920
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
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
abb5d3e
feat(functions): Enable Cloud Task Queue Emulator support
jonathanedey 43f956a
fix: lint
jonathanedey 9740962
fix: Resolved issues from gemini review
jonathanedey 9cdf76a
chore: Added basic integration tests for task enqueue and delete
jonathanedey c3a045c
chore: Setup emulator testing for Functions integration tests
jonathanedey e513613
fix: Re-added accidentally removed lint
jonathanedey cce6277
fix: integration test default apps
jonathanedey d38751b
fix: lint
jonathanedey 79664e1
Merge branch 'master' into je-tq-emulator
jonathanedey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| # Logs | ||
| logs | ||
| *.log | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
| firebase-debug.log* | ||
| firebase-debug.*.log* | ||
|
|
||
| # Firebase cache | ||
| .firebase/ | ||
|
|
||
| # Firebase config | ||
|
|
||
| # Uncomment this if you'd like others to create their own Firebase project. | ||
| # For a team working on the same Firebase project(s), it is recommended to leave | ||
| # it commented so all members can deploy to the same project(s) in .firebaserc. | ||
| # .firebaserc | ||
|
|
||
| # Runtime data | ||
| pids | ||
| *.pid | ||
| *.seed | ||
| *.pid.lock | ||
|
|
||
| # Directory for instrumented libs generated by jscoverage/JSCover | ||
| lib-cov | ||
|
|
||
| # Coverage directory used by tools like istanbul | ||
| coverage | ||
|
|
||
| # nyc test coverage | ||
| .nyc_output | ||
|
|
||
| # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
| .grunt | ||
|
|
||
| # Bower dependency directory (https://bower.io/) | ||
| bower_components | ||
|
|
||
| # node-waf configuration | ||
| .lock-wscript | ||
|
|
||
| # Compiled binary addons (http://nodejs.org/api/addons.html) | ||
| build/Release | ||
|
|
||
| # Dependency directories | ||
| node_modules/ | ||
|
|
||
| # Optional npm cache directory | ||
| .npm | ||
|
|
||
| # Optional eslint cache | ||
| .eslintcache | ||
|
|
||
| # Optional REPL history | ||
| .node_repl_history | ||
|
|
||
| # Output of 'npm pack' | ||
| *.tgz | ||
|
|
||
| # Yarn Integrity file | ||
| .yarn-integrity | ||
|
|
||
| # dotenv environment variables file | ||
| .env | ||
|
|
||
| # dataconnect generated files | ||
| .dataconnect |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| { | ||
| "emulators": { | ||
| "tasks": { | ||
| "port": 9499 | ||
| }, | ||
| "ui": { | ||
| "enabled": false | ||
| }, | ||
| "singleProjectMode": true, | ||
| "functions": { | ||
| "port": 5001 | ||
| } | ||
| }, | ||
| "functions": [ | ||
| { | ||
| "source": "functions", | ||
| "codebase": "default", | ||
| "disallowLegacyRuntimeConfig": true, | ||
| "ignore": [ | ||
| "venv", | ||
| ".git", | ||
| "firebase-debug.log", | ||
| "firebase-debug.*.log", | ||
| "*.local" | ||
| ], | ||
| "runtime": "python313" | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # Python bytecode | ||
| __pycache__/ | ||
|
|
||
| # Python virtual environment | ||
| venv/ | ||
| *.local |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| from firebase_functions import tasks_fn | ||
|
|
||
| @tasks_fn.on_task_dispatched() | ||
| def testTaskQueue(req: tasks_fn.CallableRequest) -> None: | ||
| """Handles tasks from the task queue.""" | ||
| print(f"Received task with data: {req.data}") | ||
| return |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| firebase_functions~=0.4.1 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.