Solutions to problems encountered in the deployment of CentOS 7.4 deployment automation OpsManage

  Install Python Because I installed centos7, I don't need to install python2.7. Just follow the steps below. yum install zlib zlib-devel readline-devel sqlite-devel bzip2-devel openssl-devel gdbm-devel libdbi-devel ncurses-libs kernel-devel libxslt-devel libffi-devel python-devel zlib-devel sshpass gcc git -y mv /usr/bin/ ...

Posted by dannydefreak on Wed, 01 Jan 2020 07:44:27 -0800

Configuration and use of Supervisor

brief introduction python deployment has always been a problem, but now it's 2018, and there are many mature solutions. The most commonly used is nginx + upervisor + virtualenv + gunicorn / uwsgi. The advantage is that it is very convenient to control program start / stop / restart, especially when you have many services; but abusi ...

Posted by sri2002 on Mon, 16 Dec 2019 09:24:01 -0800

Introduction to the use of Celery in Django

Celery introduction Cellery is a simple, flexible and reliable distributed system dealing with a large number of messages, and provides the necessary tools to maintain such a system. It is a task queue that focuses on real-time processing and supports task scheduling. What is task queue Task queue: a mechanism to distribute tasks between thread ...

Posted by seaten on Mon, 04 Nov 2019 20:40:47 -0800

Django uses celery and NGINX to generate static pages for performance optimization

Performance optimization principle: When we want to return a page to client browser, we need to query data in database and render the data and basic page template to form a page to return to the client. But if every user visits the home page once, it will undoubtedly bring great performance problems to database query when the amount of visits ...

Posted by dshevnock on Mon, 07 Oct 2019 13:28:29 -0700

[Python 3 Reptiles] It's over soon -- use Celery to speed up your reptiles

I. Write in front In Last blog As mentioned in the article, Celery can be used to speed up the crawling of web crawlers, which contains a large number of network requests. So, this blog will specifically talk about how to use Celery to speed up our crawlers!   II. Knowledge Supplement 1.class celery.group The group class represents the cre ...

Posted by tapdancingtenor on Sun, 25 Aug 2019 21:31:50 -0700

Fundamentals of Machine Learning - Basic Use of pandas

Introduction of pandas Python Data Analysis Library or pandas is a tool based on NumPy, which is created to solve data analysis tasks. Pandas incorporates a large number of libraries and some standard data models, providing the tools needed to operate large data sets efficiently. Pandas provides a large number of functions and methods that enab ...

Posted by toms on Sat, 11 May 2019 12:04:20 -0700

Html and CSS Layout Skills

Single row layout is in the middle The most common form of page layout in the middle of the horizontal level is the title and the organization of the content area. Here are four ways to achieve the middle of the horizontal level (note: the alignment of child elements is implemented in the following examples, and the parent container of child e ...

Posted by screamer141 on Wed, 17 Apr 2019 01:03:33 -0700

django celery redis practice

Environmental preparation python3.5.4 windows redis pip install celery pip install redis Start redirs server under windows redis-server.exe redis.windows.conf image.png celery configuration Project settings.py file modification: # celery settings # celery intermediary redis://redis service ip address: port/database num ...

Posted by stuckwithcode on Sun, 07 Apr 2019 19:33:32 -0700

Python 3.7.0 + Django 2.0.4 pits encountered using django-celery

First of all, you know that Django is a synchronization framework. In order to speed up user response time and improve user experience. So I decided to use asynchronous tasks to perform some tasks in the background. In addition to asynchronous tasks, celery can also start timing tasks to facilitate scheduling. Packages to be ins ...

Posted by forgun on Wed, 20 Mar 2019 15:39:25 -0700

Explain the common traversal methods of arrays

Preface This paper mainly introduces the common traversal methods of arrays: forEvery, map, filter, find, every, some, reduce. They have one thing in common: they do not change the original array. 1. forEach: Traversing arrays var colors = ["red","blue","green"]; // ES5 traversal array method for(var i = 0; i < colors.length; i++){ consol ...

Posted by golden_water on Sat, 19 Jan 2019 19:27:12 -0800