Skip to Content
Python数据处理
book

Python数据处理

by Jacqueline Kazil, Katharine Jarmul
July 2017
Intermediate to advanced
398 pages
11h 54m
Chinese
Posts & Telecom Press
Content preview from Python数据处理
自动化和规模化
301
在大约经过了
5
次成功或日志记录下来的失败后,你可以减少人工检查的次数。然而,
在每月或者每季度使用
grep
http://www.thegeekstuff.com/2009/03/15-practical-unix-grep-
command-examples/
)查看日志,看一下发生了什么,仍然是一个很好的主意。如果你正在
使用一个日志聚合器,你完全可以自动化这一步骤,并且让这一任务发送错误和警报报告。
自动化不是小进程,但是早早投入时间和精力是值得的。一个运行良好的自动化任务集合
需要一些时间来完成,但是结果通常比那些需要从始至终关注、修改和监控的一次性脚本
要好。密切关注并花一些时间正确地自动化你的脚本。之后才真正投入到手头接下来的工
作当中,而不是一直将你的一部分工作与监控和管理难以驾驭的任务相关联。
14.3
 什么会出错
在你的自动化程序中,有很多事情可能会出问题。其中一些非常容易更正和解释,然而其
他问题更加模糊,可能根本不会有一个真正的修正。自动化中的重要一课是搞清楚哪些类
型的错误和问题值得花时间和精力修复,哪些问题最好使用另外的方式解决。
以在第
12
章讨论过的错误类型为例:网络爬取中的网络错误。如果碰到了重大网络错误,
你只有几个好的选择。你可以改变运行任务的机器,看是否会有性能提升(这可能会带来
经济和时间上的花销,取决于你的设置)。你可以找到网络提供商,寻求支持。你可以在
不同的时间运行任务,看输出是否会有不同。你可以预测问题的发生,依据预测构建脚本
(即在需求之外运行脚本,预测失败百分比) ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

数据科学中的实用统计学(第2版)

数据科学中的实用统计学(第2版)

Peter Bruce, Andrew Bruce, Peter Gedeck
Java持续交付

Java持续交付

Daniel Bryant, Abraham Marín-Pérez
解密金融数据

解密金融数据

Justin Pauley

Publisher Resources

ISBN: 9787115459190