Celery 2.0 Documentationclass Article(models.Model): title = models.CharField() body = models.TextField() @task def expand_abbreviations(article): article.body.replace("MyCorp", "My Corporation") article.save() First on a button that initiates the abbreviation task. >>> article = Article.objects.get(id=102) >>> expand_abbreviations.delay(model_object) Now, the queue is very busy, so the task won’t be run for another task body: @task def expand_abbreviations(article_id) article = Article.objects.get(id=article_id) article.body.replace("MyCorp", "My Corporation") article.save() >>> expand_abbreviations(article_id)0 码力 | 284 页 | 332.71 KB | 1 年前3
Celery 3.0 DocumentationArticle(models.Model): title = models.CharField() body = models.TextField() @app.task def expand_abbreviations(article): article.body.replace('MyCorp', 'My Corporation') article.save() First on a button that initiates the abbreviation task: >>> article = Article.objects.get(id=102) >>> expand_abbreviations.delay(article) Now, the queue is very busy, so the task won’t be run for another 2 body: @app.task def expand_abbreviations(article_id): article = Article.objects.get(id=article_id) article.body.replace('MyCorp', 'My Corporation') article.save() >>> expand_abbreviations.delay(article_id)0 码力 | 2110 页 | 2.23 MB | 1 年前3
Celery v4.0.0 DocumentationArticle(models.Model): title = models.CharField() body = models.TextField() @app.task def expand_abbreviations(article): article.body.replace('MyCorp', 'My Corporation') article.save() First on a button that initiates the abbreviation task: >>> article = Article.objects.get(id=102) >>> expand_abbreviations.delay(article) Now, the queue is very busy, so the task won’t be run for another 2 body: @app.task def expand_abbreviations(article_id): article = Article.objects.get(id=article_id) article.body.replace('MyCorp', 'My Corporation') article.save() >>> expand_abbreviations.delay(article_id)0 码力 | 2106 页 | 2.23 MB | 1 年前3
Celery 2.0 Documentationit. class Article(models.Model): title = models.CharField() body = models.TextField() @task def expand_abbreviations(article): article.body.replace("MyCorp", "My Corporation") article.save() First, an on a button that initiates the abbreviation task. >>> article = Article.objects.get(id=102) >>> expand_abbreviations.delay(model_object) Now, the queue is very busy, so the task won’t be run for another the task body: @task def expand_abbreviations(article_id) article = Article.objects.get(id=article_id) article.body.replace("MyCorp", "My Corporation") article.save() >>> expand_abbreviations(article_id)0 码力 | 165 页 | 492.43 KB | 1 年前3
Celery v5.0.1 DocumentationArticle(models.Model): title = models.CharField() body = models.TextField() @app.task def expand_abbreviations(article): article.body.replace('MyCorp', 'My Corporation') article.save() First on a button that initiates the abbreviation task: >>> article = Article.objects.get(id=102) >>> expand_abbreviations.delay(article) Now, the queue is very busy, so the task won’t be run for another 2 body: @app.task def expand_abbreviations(article_id): article = Article.objects.get(id=article_id) article.body.replace('MyCorp', 'My Corporation') article.save() >>> expand_abbreviations.delay(article_id)0 码力 | 2313 页 | 2.13 MB | 1 年前3
Celery v5.0.2 DocumentationArticle(models.Model): title = models.CharField() body = models.TextField() @app.task def expand_abbreviations(article): article.body.replace('MyCorp', 'My Corporation') article.save() First on a button that initiates the abbreviation task: >>> article = Article.objects.get(id=102) >>> expand_abbreviations.delay(article) Now, the queue is very busy, so the task won’t be run for another 2 body: @app.task def expand_abbreviations(article_id): article = Article.objects.get(id=article_id) article.body.replace('MyCorp', 'My Corporation') article.save() >>> expand_abbreviations.delay(article_id)0 码力 | 2313 页 | 2.14 MB | 1 年前3
Celery v5.0.0 DocumentationArticle(models.Model): title = models.CharField() body = models.TextField() @app.task def expand_abbreviations(article): article.body.replace('MyCorp', 'My Corporation') article.save() First on a button that initiates the abbreviation task: >>> article = Article.objects.get(id=102) >>> expand_abbreviations.delay(article) Now, the queue is very busy, so the task won’t be run for another 2 body: @app.task def expand_abbreviations(article_id): article = Article.objects.get(id=article_id) article.body.replace('MyCorp', 'My Corporation') article.save() >>> expand_abbreviations.delay(article_id)0 码力 | 2309 页 | 2.13 MB | 1 年前3
Celery v5.0.5 DocumentationArticle(models.Model): title = models.CharField() body = models.TextField() @app.task def expand_abbreviations(article): article.body.replace('MyCorp', 'My Corporation') article.save() First on a button that initiates the abbreviation task: >>> article = Article.objects.get(id=102) >>> expand_abbreviations.delay(article) Now, the queue is very busy, so the task won’t be run for another 2 body: @app.task def expand_abbreviations(article_id): article = Article.objects.get(id=article_id) article.body.replace('MyCorp', 'My Corporation') article.save() >>> expand_abbreviations.delay(article_id)0 码力 | 2315 页 | 2.14 MB | 1 年前3
Celery 2.1 Documentationclass Article(models.Model): title = models.CharField() body = models.TextField() @task def expand_abbreviations(article): article.body.replace("MyCorp", "My Corporation") article.save() First on a button that initiates the abbreviation task. >>> article = Article.objects.get(id=102) >>> expand_abbreviations.delay(model_object) Now, the queue is very busy, so the task won’t be run for another task body: @task def expand_abbreviations(article_id): article = Article.objects.get(id=article_id) article.body.replace("MyCorp", "My Corporation") article.save() >>> expand_abbreviations(article_id)0 码力 | 463 页 | 861.69 KB | 1 年前3
Celery 2.1 Documentationit: class Article(models.Model): title = models.CharField() body = models.TextField() @task def expand_abbreviations(article): article.body.replace("MyCorp", "My Corporation") article.save() First, an on a button that initiates the abbreviation task. >>> article = Article.objects.get(id=102) >>> expand_abbreviations.delay(model_object) Now, the queue is very busy, so the task won’t be run for another the task body: @task def expand_abbreviations(article_id): article = Article.objects.get(id=article_id) article.body.replace("MyCorp", "My Corporation") article.save() >>> expand_abbreviations(article_id)0 码力 | 285 页 | 1.19 MB | 1 年前3
共 51 条
- 1
- 2
- 3
- 4
- 5
- 6













