Mongodb update array $pull modifier
1. $pull modifier deletes qualifying elements from the array in the following format:
{ $pull: { <field1>: <value|condition>, <field2>: <value|condition>, ... } }
2. Specify a value to delete all lists
Give a document under a stores collection
{
_id: 1,
fruits: [ "apples", "pears", "oranges", "grapes", "bana ...
Posted on Mon, 20 Jul 2020 10:53:53 -0400 by maniac1aw
The practice of using cellery in flask
Preface
In web development, we often encounter some time-consuming operations, such as sending e-mail / SMS, performing various tasks, etc. at this time, we will take an asynchronous way to perform these tasks, and cellery is such an asynchronous distributed task processing framework, Official documents Today, our topic is how to work with fl ...
Posted on Wed, 04 Mar 2020 05:43:54 -0500 by jacobsdad
Nginx + django + uwsgi + cellery + supervisor deploy multiple django projects
Multiple django projects deployed in Alibaba cloud CentOS 7
I. nginx
Two, uwsgi
3, Starting cellery with the supervisor Daemons
I. installation
Two, configuration
3, Common commands
4, Start automatically
I. nginx
server {
listen 80;
server_name Extranet ip address;
location / {
...
Posted on Sat, 22 Feb 2020 10:08:19 -0500 by daf_cr
django sends messages asynchronously using cellery
1. Install the cellery module
pip install -U celery==4.3.0
2. Create the relevant directory of cellery
xiaolan/ # Project home directory
├── mycelery/
├── config.py # configuration file
├── __init__.py
├── main.py # main program
└── sms/ # Multiple tasks can be placed in one directory, which stores the mo ...
Posted on Wed, 08 Jan 2020 09:53:01 -0500 by daq
How to add Gallery configuration when using Gallery
background
Some time ago, I used Airflow to archive the data of wms. After running for some time, I often found the following errors:
[2020-01-07 14:41:34,465: WARNING/ForkPoolWorker-5] Failed operation _store_result. Retrying 2 more times.
Traceback (most recent call last):
File "/usr/local/python38/lib/python3.8/site-packages/sqlalch ...
Posted on Tue, 07 Jan 2020 11:05:03 -0500 by LordPsyan
Manage AirFlow methods
@[toc]
Manage AirFlow methods
Supervisor, a process management tool
Install process management tool supervisor to manage the airflow process
Easy? Install supervisor? This method is not applicable to Python 3 installation (many problems will occur)
echo_supervisord_conf > /etc/supervisord.conf
Edit the file supervisor.conf and add t ...
Posted on Sun, 29 Dec 2019 11:12:27 -0500 by Angus
django development - building distributed (multi node) task queue with cellery
Today, I'll show you how to use cellery to build a task queue with two nodes in django project (one master node and one child node; the master node publishes the task, and the child node receives the task and executes it. It's similar to setting up three or more nodes), using cellery, rabbitmq. The knowledge in cellery and rabbitmq will not be ...
Posted on Mon, 02 Dec 2019 19:43:06 -0500 by !jazz
celery scheduled task usage
Process: User submission task - > Celery - > Broker middleman (can be database, redis) - > Finally let worker in celery perform task1 Used alone:
celery_worker.py file
#-*- coding:utf-8 -*-
from celery import Celery
import time
app = Celery('tasks', #tasks yes app Name
broker='redis://12 ...
Posted on Sun, 13 Oct 2019 11:30:26 -0400 by mrphobos
Using Celery to Complete Asynchronous and Timing Tasks
0917 self-summary
Use of Celery
I. Official Documents
Celery official website: http://www.celeryproject.org/
Celery official document in English: http://docs.celeryproject.org/en/latest/index.html
Chinese version of Celery official document: http://docs.jinkan.org/docs/celery/
II. Celery Architecture
Celery's architecture consists of three part ...
Posted on Tue, 17 Sep 2019 10:32:34 -0400 by sailu_mvn
Realization of Small Program Shopping Cart
Links to the original text: https://www.cnblogs.com/linxin/p/6834206.html
Preface
In the past, shopping carts were basically implemented through a large number of DOM operations. The Wechat applet is very similar to vue.js. Next, let's ...
Posted on Wed, 11 Sep 2019 01:56:30 -0400 by SteveMT