Gearman的工作和任务有什么区别?

时间:2022-05-31 02:17:19

I'm trying to understand Gearman but until now I can't figure out what's the difference between task and job.

我正在努力理解Gearman,但直到现在我还无法弄清楚任务和工作之间的区别。

I'm trying to create a client which will parse periodically (every 10 minutes) a XML page. Which is the best approach?

我正在尝试创建一个客户端,它将定期(每10分钟)解析一个XML页面。哪种方法最好?

1 个解决方案

#1


2  

The manual offers a terrific explanation:

该手册提供了一个很好的解释:

Jobs vs. Tasks

A task is any request or communication between the client and the job server. A task is usually communication about a job. Tasks might be please run this job or what is the status of this job. A job is something the worker does, continuously waiting on the job server to tell him when to start and with what arguments. Clients submit jobs and ask for status about jobs (both of those things are considered tasks). Workers actually perform the jobs.

任务是客户端和作业服务器之间的任何请求或通信。任务通常是关于工作的沟通。任务可能是请运行此工作或此工作的状态。工作是工作人员所做的事情,不断等待工作服务器告诉他何时开始以及使用什么参数。客户提交工作并询问有关工作的状态(这两项都被视为任务)。工人实际上完成了工作。

#1


2  

The manual offers a terrific explanation:

该手册提供了一个很好的解释:

Jobs vs. Tasks

A task is any request or communication between the client and the job server. A task is usually communication about a job. Tasks might be please run this job or what is the status of this job. A job is something the worker does, continuously waiting on the job server to tell him when to start and with what arguments. Clients submit jobs and ask for status about jobs (both of those things are considered tasks). Workers actually perform the jobs.

任务是客户端和作业服务器之间的任何请求或通信。任务通常是关于工作的沟通。任务可能是请运行此工作或此工作的状态。工作是工作人员所做的事情,不断等待工作服务器告诉他何时开始以及使用什么参数。客户提交工作并询问有关工作的状态(这两项都被视为任务)。工人实际上完成了工作。