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
| from celery import signature | |
| from celery import Celery | |
| app = Celery(name="tasks", | |
| broker="redis://localhost:6379/0", | |
| backend="db+sqlite:///db+sqlite3" | |
| ) | |
| @app.task | |
| def sum_2_num(param1, param2): |
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
| from celery import Celery | |
| from celery import chord | |
| import time | |
| app = Celery(name="tasks", | |
| broker="redis://localhost:6379/0", | |
| backend="db+sqlite:///db+sqlite3" | |
| ) | |
| @app.task | |
| def sum_2_num(param1, param2): |
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
| from celery import Celery | |
| from celery import chain | |
| import time | |
| app = Celery(name="tasks", | |
| broker="redis://localhost:6379/0", | |
| backend="db+sqlite:///db+sqlite3" | |
| ) | |
| @app.task |
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
| from celery import Celery | |
| from celery import group | |
| import time | |
| app = Celery(name="tasks", | |
| broker="redis://localhost:6379/0", | |
| backend="db+sqlite:///db+sqlite3" | |
| ) | |
| @app.task |
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
| from celery import Celery | |
| import time | |
| from celery.schedules import crontab | |
| app = Celery(name="tasks", | |
| broker="redis://localhost:6379/0", | |
| backend="db+sqlite:///db+sqlite3" | |
| ) | |
| @app.task |
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
| from celery import Celery | |
| import time | |
| from celery.schedules import crontab | |
| app = Celery(name="tasks", | |
| broker="redis://localhost:6379/0", | |
| backend="db+sqlite:///db+sqlite3" | |
| ) | |
| @app.task |
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
| from celery import Celery | |
| import time | |
| app = Celery(name="tasks", | |
| broker="redis://localhost:6379/0", | |
| backend="db+sqlite:///db+sqlite3" | |
| ) | |
| @app.task # <= Decorator | |
| def absolute_sub(num_1, num_2): |
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
| import time | |
| def absoluteSub(a, b): | |
| time.sleep(15) | |
| return abs(a - b) |
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
| from celery import Celery | |
| app = Celery(name="tasks", | |
| broker="redis://localhost:6379/0", | |
| backend="db+sqlite:///db+sqlite3" | |
| ) |
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
| class Node{ | |
| constructor(data){ | |
| this.data = data; | |
| this.left; | |
| this.righ; | |
| } | |
| } |