Celery 分布式任务队列快速入门

本节内容

Celery介绍和基本使用

在项目中如何使用celery

启用多个workers

Celery 定时任务

与django结合

通过django配置celery periodic task

一、Celery介绍和基本使用

Celery 是一个 基于python开发的分布式异步消息任务队列,通过它可以轻松的实现任务的异步处理, 如果你的业务场景中需要用到异步任务,就可以考虑使用celery, 举几个实例场景中可用的例子:

  1. 你想对100台机器执行一条批量命令,可能会花很长时间 ,但你不想让你的程序等着结果返回,而是给你返回 一个任务ID,你过一段时间只需要拿着这个任务id就可以拿到任务执行结果, 在任务执行ing进行时,你可以继续做其它的事情。
  2. 你想做一个定时任务,比如每天检测一下你们所有客户的资料,如果发现今天 是客户的生日,就给他发个短信祝福

Celery 在执行任务时需要通过一个消息中间件来接收和发送任务消息,以及存储任务结果, 一般使用rabbitMQ or Redis,后面会讲

1.1 Celery有以下优点:

  1. 简单:一单熟悉了celery的工作流程后,配置和使用还是比较简单的
  2. 高可用:当任务执行失败或执行过程中发生连接中断,celery 会自动尝试重新执行任务
  3. 快速:一个单进程的celery每分钟可处理上百万个任务
  4. 灵活: 几乎celery的各个组件都可以被扩展及自定制

Celery基本工作流程图

1.2 Celery安装使用

Celery的默认broker是RabbitMQ, 仅需配置一行就可以

1
broker_url = 'amqp://guest:guest@localhost:5672//'

rabbitMQ 没装的话请装一下,安装看这里  http://docs.celeryproject.org/en/latest/getting-started/brokers/rabbitmq.html#id3

使用Redis做broker也可以

安装redis组件

1
$ pip install -"celery[redis]"

配置

Configuration is easy, just configure the location of your Redis database:

app.conf.broker_url = 'redis://localhost:6379/0' 

Where the URL is in the format of:

redis://:password@hostname:port/db_number

all fields after the scheme are optional, and will default to localhost on port 6379, using database 0.

如果想获取每个任务的执行结果,还需要配置一下把任务结果存在哪

If you also want to store the state and return values of tasks in Redis, you should configure these settings:

app.conf.result_backend = 'redis://localhost:6379/0' 

1. 3 开始使用Celery啦  

安装celery模块

1
$ pip install celery

创建一个celery application 用来定义你的任务列表

创建一个任务文件就叫tasks.py吧

1
2
3
4
5
6
7
8
9
10
from celery import Celery
app = Celery('tasks',
             broker='redis://localhost',
             backend='redis://localhost')
@app.task
def add(x,y):
    print("running...",x,y)
    return x+y

启动Celery Worker来开始监听并执行任务

1
$ celery -A tasks worker --loglevel=info

  

调用任务

再打开一个终端, 进行命令行模式,调用任务  

1
2
>>> from tasks import add
>>> add.delay(44)

看你的worker终端会显示收到 一个任务,此时你想看任务结果的话,需要在调用 任务时 赋值个变量

1
>>> result = add.delay(44)

The ready() method returns whether the task has finished processing or not:

>>> result.ready()
False 

You can wait for the result to complete, but this is rarely used since it turns the asynchronous call into a synchronous one:

>>> result.get(timeout=1) 8 

In case the task raised an exception, get() will re-raise the exception, but you can override this by specifying the propagate argument:

>>> result.get(propagate=False) 

If the task raised an exception you can also gain access to the original traceback:

>>> result.traceback
…

  

二、在项目中如何使用celery 

可以把celery配置成一个应用

目录格式如下

1
2
3
proj/__init__.py
    /celery.py
    /tasks.py

proj/celery.py内容

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from __future__ import absolute_import, unicode_literals
from celery import Celery
app = Celery('proj',
             broker='amqp://',
             backend='amqp://',
             include=['proj.tasks'])
# Optional configuration, see the application user guide.
app.conf.update(
    result_expires=3600,
)
if __name__ == '__main__':
    app.start()

proj/tasks.py中的内容

from __future__ import absolute_import, unicode_literals
from .celery import app@app.task
def add(x, y):return x + y@app.task
def mul(x, y):return x * y@app.task
def xsum(numbers):return sum(numbers)

启动worker 

1
$ celery -A proj worker -l info

输出

1
2
3
4
5
6
7
8
9
10
11
12
13
-------------- celery@Alexs-MacBook-Pro.local v4.0.2 (latentcall)
---- **** -----
--- * ***  * -- Darwin-15.6.0-x86_64-i386-64bit 2017-01-26 21:50:24
-- * - **** ---
- ** ---------- [config]
- ** ---------- .> app:         proj:0x103a020f0
- ** ---------- .> transport:   redis://localhost:6379//
- ** ---------- .> results:     redis://localhost/
- *** --- * --- .> concurrency: 8 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
--- ***** -----
 -------------- [queues]
                .> celery           exchange=celery(direct) key=celery

  

后台启动worker

In the background

In production you’ll want to run the worker in the background, this is described in detail in the daemonization tutorial.

The daemonization scripts uses the celery multi command to start one or more workers in the background:

$ celery multi start w1 -A proj -l info
celery multi v4.0.0 (latentcall)
> Starting nodes...
    > w1.halcyon.local: OK

You can restart it too:

$ celery  multi restart w1 -A proj -l info
celery multi v4.0.0 (latentcall)
> Stopping nodes...
    > w1.halcyon.local: TERM -> 64024
> Waiting for 1 node.....  > w1.halcyon.local: OK > Restarting node w1.halcyon.local: OK celery multi v4.0.0 (latentcall) > Stopping nodes...  > w1.halcyon.local: TERM -> 64052 

or stop it:

$ celery multi stop w1 -A proj -l info

The stop command is asynchronous so it won’t wait for the worker to shutdown. You’ll probably want to use the stopwait command instead, this ensures all currently executing tasks is completed before exiting:

$ celery multi stopwait w1 -A proj -l info

  

 

三、Celery 定时任务

celery支持定时任务,设定好任务的执行时间,celery就会定时自动帮你执行, 这个定时任务模块叫celery beat

写一个脚本 叫periodic_task.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from celery import Celery
from celery.schedules import crontab
app = Celery()
@app.on_after_configure.connect
def setup_periodic_tasks(sender, **kwargs):
    # Calls test('hello') every 10 seconds.
    sender.add_periodic_task(10.0, test.s('hello'), name='add every 10')
    # Calls test('world') every 30 seconds
    sender.add_periodic_task(30.0, test.s('world'), expires=10)
    # Executes every Monday morning at 7:30 a.m.
    sender.add_periodic_task(
        crontab(hour=7, minute=30, day_of_week=1),
        test.s('Happy Mondays!'),
    )
@app.task
def test(arg):
    print(arg)

add_periodic_task 会添加一条定时任务

上面是通过调用函数添加定时任务,也可以像写配置文件 一样的形式添加, 下面是每30s执行的任务

1
2
3
4
5
6
7
8
app.conf.beat_schedule = {
    'add-every-30-seconds': {
        'task''tasks.add',
        'schedule'30.0,
        'args': (1616)
    },
}
app.conf.timezone = 'UTC'

  

任务添加好了,需要让celery单独启动一个进程来定时发起这些任务, 注意, 这里是发起任务,不是执行,这个进程只会不断的去检查你的任务计划, 每发现有任务需要执行了,就发起一个任务调用消息,交给celery worker去执行

启动任务调度器 celery beat

1
$ celery -A periodic_task beat

输出like below

1
2
3
4
5
6
7
8
9
10
celery beat v4.0.2 (latentcall) is starting.
__    -    ... __   -        _
LocalTime -> 2017-02-08 18:39:31
Configuration ->
    . broker -> redis://localhost:6379//
    . loader -> celery.loaders.app.AppLoader
    . scheduler -> celery.beat.PersistentScheduler
    . db -> celerybeat-schedule
    . logfile -> [stderr]@%WARNING
    . maxinterval -> 5.00 minutes (300s)

此时还差一步,就是还需要启动一个worker,负责执行celery beat发起的任务

启动celery worker来执行任务

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$ celery -A periodic_task worker
  
 -------------- celery@Alexs-MacBook-Pro.local v4.0.2 (latentcall)
---- **** -----
--- * ***  * -- Darwin-15.6.0-x86_64-i386-64bit 2017-02-08 18:42:08
-- * - **** ---
- ** ---------- [config]
- ** ---------- .> app:         tasks:0x104d420b8
- ** ---------- .> transport:   redis://localhost:6379//
- ** ---------- .> results:     redis://localhost/
- *** --- * --- .> concurrency: 8 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
--- ***** -----
 -------------- [queues]
                .> celery           exchange=celery(direct) key=celery

  

好啦,此时观察worker的输出,是不是每隔一小会,就会执行一次定时任务呢!

注意:Beat needs to store the last run times of the tasks in a local database file (named celerybeat-schedule by default), so it needs access to write in the current directory, or alternatively you can specify a custom location for this file:

1
$ celery -A periodic_task beat -s /home/celery/var/run/celerybeat-schedule

更复杂的定时配置  

上面的定时任务比较简单,只是每多少s执行一个任务,但如果你想要每周一三五的早上8点给你发邮件怎么办呢?哈,其实也简单,用crontab功能,跟linux自带的crontab功能是一样的,可以个性化定制任务执行时间

linux crontab http://www.cnblogs.com/peida/archive/2013/01/08/2850483.html 

1
2
3
4
5
6
7
8
9
10
from celery.schedules import crontab
app.conf.beat_schedule = {
    # Executes every Monday morning at 7:30 a.m.
    'add-every-monday-morning': {
        'task''tasks.add',
        'schedule': crontab(hour=7, minute=30, day_of_week=1),
        'args': (1616),
    },
}

上面的这条意思是每周1的早上7.30执行tasks.add任务

还有更多定时配置方式如下:

Example Meaning
crontab() Execute every minute.
crontab(minute=0, hour=0) Execute daily at midnight.
crontab(minute=0, hour='*/3') Execute every three hours: midnight, 3am, 6am, 9am, noon, 3pm, 6pm, 9pm.
crontab(minute=0,
hour='0,3,6,9,12,15,18,21')
Same as previous.
crontab(minute='*/15') Execute every 15 minutes.
crontab(day_of_week='sunday') Execute every minute (!) at Sundays.
crontab(minute='*',
hour='*',day_of_week='sun')
Same as previous.
crontab(minute='*/10',
hour='3,17,22',day_of_week='thu,fri')
Execute every ten minutes, but only between 3-4 am, 5-6 pm, and 10-11 pm on Thursdays or Fridays.
crontab(minute=0,hour='*/2,*/3') Execute every even hour, and every hour divisible by three. This means: at every hour except: 1am, 5am, 7am, 11am, 1pm, 5pm, 7pm, 11pm
crontab(minute=0, hour='*/5') Execute hour divisible by 5. This means that it is triggered at 3pm, not 5pm (since 3pm equals the 24-hour clock value of “15”, which is divisible by 5).
crontab(minute=0, hour='*/3,8-17') Execute every hour divisible by 3, and every hour during office hours (8am-5pm).
crontab(0, 0,day_of_month='2') Execute on the second day of every month.
crontab(0, 0,
day_of_month='2-30/3')
Execute on every even numbered day.
crontab(0, 0,
day_of_month='1-7,15-21')
Execute on the first and third weeks of the month.
crontab(0, 0,day_of_month='11',
month_of_year='5')
Execute on the eleventh of May every year.
crontab(0, 0,
month_of_year='*/3')
Execute on the first month of every quarter.

上面能满足你绝大多数定时任务需求了,甚至还能根据潮起潮落来配置定时任务, 具体看 http://docs.celeryproject.org/en/latest/userguide/periodic-tasks.html#solar-schedules   

   

  

四、最佳实践之与django结合

django 可以轻松跟celery结合实现异步任务,只需简单配置即可

If you have a modern Django project layout like:

- proj/- proj/__init__.py - proj/settings.py - proj/urls.py - manage.py 

then the recommended way is to create a new proj/proj/celery.py module that defines the Celery instance:

file: proj/proj/celery.py  

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from __future__ import absolute_import, unicode_literals
import os
from celery import Celery
# set the default Django settings module for the 'celery' program.
os.environ.setdefault('DJANGO_SETTINGS_MODULE''proj.settings')
app = Celery('proj')
# Using a string here means the worker don't have to serialize
# the configuration object to child processes.
# - namespace='CELERY' means all celery-related configuration keys
#   should have a `CELERY_` prefix.
app.config_from_object('django.conf:settings', namespace='CELERY')
# Load task modules from all registered Django app configs.
app.autodiscover_tasks()
@app.task(bind=True)
def debug_task(self):
    print('Request: {0!r}'.format(self.request))

Then you need to import this app in your proj/proj/__init__.py module. This ensures that the app is loaded when Django starts so that the @shared_task decorator (mentioned later) will use it:  

proj/proj/__init__.py:

1
2
3
4
5
6
7
from __future__ import absolute_import, unicode_literals
# This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
from .celery import app as celery_app
__all__ = ['celery_app']

Note that this example project layout is suitable for larger projects, for simple projects you may use a single contained module that defines both the app and tasks, like in the First Steps with Celery tutorial.  

Let’s break down what happens in the first module, first we import absolute imports from the future, so that our celery.py module won’t clash with the library:

1
from __future__ import absolute_import

Then we set the default DJANGO_SETTINGS_MODULE environment variable for the celery command-line program:

1
os.environ.setdefault('DJANGO_SETTINGS_MODULE''proj.settings')

You don’t need this line, but it saves you from always passing in the settings module to the celery program. It must always come before creating the app instances, as is what we do next:

1
app = Celery('proj')

This is our instance of the library.

We also add the Django settings module as a configuration source for Celery. This means that you don’t have to use multiple configuration files, and instead configure Celery directly from the Django settings; but you can also separate them if wanted.

The uppercase name-space means that all Celery configuration options must be specified in uppercase instead of lowercase, and start with CELERY_, so for example the task_always_eager` setting becomes CELERY_TASK_ALWAYS_EAGER, and the broker_url setting becomes CELERY_BROKER_URL.

You can pass the object directly here, but using a string is better since then the worker doesn’t have to serialize the object.

1
app.config_from_object('django.conf:settings', namespace='CELERY')

Next, a common practice for reusable apps is to define all tasks in a separate tasks.pymodule, and Celery does have a way to  auto-discover these modules:

1
app.autodiscover_tasks()

With the line above Celery will automatically discover tasks from all of your installed apps, following the tasks.py convention:

1
2
3
4
5
6
- app1/
    - tasks.py
    - models.py
- app2/
    - tasks.py
    - models.py

Finally, the debug_task example is a task that dumps its own request information. This is using the new bind=True task option introduced in Celery 3.1 to easily refer to the current task instance.

然后在具体的app里的tasks.py里写你的任务

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Create your tasks here
from __future__ import absolute_import, unicode_literals
from celery import shared_task
@shared_task
def add(x, y):
    return + y
@shared_task
def mul(x, y):
    return * y
@shared_task
def xsum(numbers):
    return sum(numbers)

在你的django views里调用celery task

1
2
3
4
5
6
7
8
9
10
11
12
13
from django.shortcuts import render,HttpResponse
# Create your views here.
from  bernard import tasks
def task_test(request):
    res = tasks.add.delay(228,24)
    print("start running task")
    print("async task res",res.get() )
    return HttpResponse('res %s'%res.get())

  

  

  

五、在django中使用计划任务功能  

There’s  the django-celery-beat extension that stores the schedule in the Django database, and presents a convenient admin interface to manage periodic tasks at runtime.

To install and use this extension:

  1. Use pip to install the package:

    $ pip install django-celery-beat
    

  2. Add the django_celery_beat module to INSTALLED_APPS in your Django project’ settings.py:

        INSTALLED_APPS = (...,'django_celery_beat', ) Note that there is no dash in the module name, only underscores. 

  3. Apply Django database migrations so that the necessary tables are created:

    $ python manage.py migrate
    

  4. Start the celery beat service using the django scheduler:

    $ celery -A proj beat -l info -S django
    

  5. Visit the Django-Admin interface to set up some periodic tasks.

  

在admin页面里,有3张表

配置完长这样

此时启动你的celery beat 和worker,会发现每隔2分钟,beat会发起一个任务消息让worker执行scp_task任务

注意,经测试,每添加或修改一个任务,celery beat都需要重启一次,要不然新的配置不会被celery beat进程读到

  

  

 

  

  

  

 

好文要顶 关注我 收藏该文  

金角大王
关注 - 1
粉丝 - 4240

+加关注

6
0

« 上一篇:python 之路,Day12 - redis缓存数据库
» 下一篇:Django杂货铺-Class based views

posted @ 2017-01-26 18:22 金角大王 阅读(18170) 评论(1)  编辑 收藏

评论列表
回复引用

#1楼 2017-12-27 20:01 creazyloser

app.conf.broker_url = 'redis://localhost:6379/0',请问这个是在哪配?是celery生成了app实例后,写在下面吗?
支持(0)反对(0)

发表评论

昵称:

评论内容:
     

退出 订阅评论

[Ctrl+Enter快捷键提交]

【推荐】超50万VC++源码: 大型组态工控、电力仿真CAD与GIS源码库!
【缅怀】传奇谢幕,回顾霍金76载传奇人生
【推荐】腾讯云校园拼团福利,1核2G服务器10元/月!
【活动】2050 科技公益大会 - 年青人因科技而团聚
最新IT新闻:
· Facebook数据被滥用引起公众质疑:涉及5000万用户
· 绝地求生用户数骤降,会像《守望先锋》一样火一把就死吗?
· 回乡偶记:电商、移动支付、短视频,小山村里一个都没少
· 再见,孙宏斌!再见,乐视!
· Facebook面临生死考验,管理层火上浇油抛售股份
» 更多新闻...
最新知识库文章:

· 写给自学者的入门指南
· 和程序员谈恋爱
· 学会学习
· 优秀技术人的管理陷阱
· 作为一个程序员,数学对你到底有多重要

» 更多知识库文章...

公告

我们多数人的问题都是因为想法太多,读书太少!


python开发交流群255012808 
路飞学城作者

昵称:金角大王
园龄:3年1个月
粉丝:4240
关注:1

+加关注

我的标签

  • 职业发展(1)

文章分类

  • Python全栈开发之路(6)
  • Python学习目录(2)
  • Python自动化开发之路(33)
  • 爬虫(6)

最新评论

  • 1. Re:那些已成定局的人和事
  • 虽然你的演讲的确精彩,但有个观点我持不同的意见。”你提到了令姊的例子(抱歉我不是想要gossip或dis你的家人),为了说明选择比努力更重要和学习上的30岁年龄限制的观点。最终激励年轻人及时找到自己的......
  • --jalapeno
  • 2. Re:一位失足程序员的来信
  • 我知道了,八成是这句,“我是一个特别爱旅行的人。我去过不少地方,我去过南极、去过北极,”,和路飞学城的自我介绍基本一致。
  • --jalapeno
  • 3. Re:那些已成定局的人和事
  • MARK
  • --异次元代码
  • 4. Re:Python之路,Day9, 进程、线程、协程篇
  • 强烈推荐我们看的是全英文的啊,完全看不懂
  • --不识i
  • 5. Re:一位失足程序员的来信
  • @北海悟空 你确定是这句话?他说“猜”的话,应该是没有明说,所以我觉得可能不是这句话。...
  • --jalapeno

阅读排行榜

  • 1. Python Select 解析(15624)
  • 2. Django + Uwsgi + Nginx 实现生产环境部署(11540)
  • 3. 刚收到一个吃瓜群众看了肯定不信的offer!(10499)
  • 4. 编程要自学或报班这事你都想不明白, 那必然是你智商不够(10069)
  • 5. 关于认识、格局、多维度发展的感触(8836)

评论排行榜

  • 1. 关于认识、格局、多维度发展的感触(88)
  • 2. 编程要自学或报班这事你都想不明白, 那必然是你智商不够(47)
  • 3. 给一位做技术迷茫的同学回信(45)
  • 4. 好好写代码吧,没事别瞎B去创业!(23)
  • 5. 不敢想!(23)

推荐排行榜

  • 1. 给一位做技术迷茫的同学回信(42)
  • 2. 你做了哪些事,导致老板下调了对你的评价?(41)
  • 3. 关于认识、格局、多维度发展的感触(38)
  • 4. 编程要自学或报班这事你都想不明白, 那必然是你智商不够(28)
  • 5. 好好写代码吧,没事别瞎B去创业!(10)

转载于:https://www.cnblogs.com/leigepython/p/8600498.html

Celery 分布式任务队列快速入门相关推荐

  1. python Celery 分布式任务队列快速入门

    本节内容 Celery介绍和基本使用 在项目中如何使用celery 启用多个workers Celery 定时任务 与django结合 通过django配置celery periodic task 一 ...

  2. python 分布式队列_〖Python〗-- Celery分布式任务队列

    [Celery分布式任务队列] 一.Celery介绍和基本使用 Celery 是一个 基于python开发的分布式异步消息任务队列,通过它可以轻松的实现任务的异步处理, 如果你的业务场景中需要用到异步 ...

  3. 分布式MinIO快速入门 ​​​​​​​

    分布式MinIO快速入门 分布式Minio可以让你将多块硬盘(甚至在不同的机器上)组成一个对象存储服务.由于硬盘分布在不同的节点上,分布式Minio避免了单点故障. 分布式Minio有什么好处? 在大 ...

  4. Redisson分布式锁快速入门教程

    清明在家无事,并且因为上海疫情原因只能宅在家里,突然想到之前计划着写一篇Redisson的分布式锁快速入门教程,自己平常在工作中也只能简单会使用,所以文章可能写的比较简单,希望大佬勿喷.此文章也作为个 ...

  5. Celery分布式任务队列的认识和基本操作

    一.简单认识 Celery是由Python开发.简单.灵活.可靠的分布式任务队列,其本质是生产者消费者模型,生产者发送任务到消息队列,消费者负责处理任务.Celery侧重于实时操作,但对调度支持也很好 ...

  6. Python定时任务库Celery——分布式任务队列

    文章目录 定时任务库对比 简介 安装 初试 进阶 项目结构 配置文件 Celery实例化 实时任务 定时任务 调用任务 启动定时任务 任务状态跟踪 递归调用 Celery配置 命令行参数 分布式集群部 ...

  7. Python 第三方库之 Celery 分布式任务队列

    一.Celery介绍和使用: Celery 是一个 基于python开发的分布式异步消息任务队列,通过它可以轻松的实现任务的异步处理, 如果你的业务场景中需要用到异步任务,就可以考虑使用celery, ...

  8. Celery分布式任务队列学习记录

    安装与环境配置 环境:Ubuntu18.04 安装celery root@ubuntu:/home/toohoo/learncelery# pip install celery==3.1.25 Col ...

  9. 分布式任务队列 Celery — 深入 Task

    目录 文章目录 目录 前文列表 前言 Task 的实例化 任务的名字 任务的绑定 任务的重试 任务的请求上下文 任务的继承 前文列表 分布式任务队列 Celery 分布式任务队列 Celery -- ...

最新文章

  1. SEO查询指令,非常值得你收藏!
  2. 数据科学中的6个基本算法,掌握它们要学习哪些知识
  3. 弹指之间 -- Waltz
  4. 洛谷P2286 [HNOI2004]宠物收养所 [STL,平衡树]
  5. python作业是什么意思_Python12.21-基本数据类型学习笔记和作业,python1221,及
  6. padding 不占宽高_不占地方的复式楼室内电梯,极致微型,节电省力颜值高
  7. linux无盘工作站互不干扰,Linux环境下无盘工作站的架设和实现二
  8. c语言api函数写病毒,C语言病毒代码,及写病毒简单介绍
  9. mach-o hook
  10. VGGnet论文解读及代码实现
  11. 玩转shell命令行
  12. SpringBoot实战教程(2)| 整合knife4j3.0.3
  13. Vue使用Canvas绘制图片、矩形、线条、文字,下载图片
  14. solr查询如何支持多个fq 多条件查询
  15. 【java】正则表达式
  16. spark sql 对接 HDFS
  17. C#使用Aforge对uvc协议摄像头亮度属性的更改
  18. PHP图片合成(gd库)
  19. 必应 Bing 有点意思的搜索引擎
  20. 课程预约小程序开发需要哪些功能?

热门文章

  1. 评价端到端生成式聊天系统,哈工大提出新型数据集 LSDSCC
  2. Appium连接手机启动报错UiAutomation not connected!
  3. 手把手教你Android标准App的四大自动化测试法宝
  4. PHP——chr 函数将ASCII转化为字符,ord 函数将字符转化为ASCII
  5. iOS开发之iOS13 暗黑模式(Dark Mode)适配
  6. 高中毕业可以去学python吗,有没有合适的学习路线和学习方法?
  7. ADC值转换成实际电压值
  8. 程序员代码频现侮辱用户的词语,网友称这吐槽有点过分了!
  9. 跨部门沟通与协作迟迟进展不下去,如何有效解决问题?
  10. wait_event_interruptible()和wait_up_interruptible()