Code Monkey home page Code Monkey logo

croon's People

Contributors

dcb9 avatar hfcorriez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

croon's Issues

安装Croon的时候出错

你好,
我在运行

composer require croon/croon

Please provide a version constraint for the croon/croon requirement:

然后我就不知道该输入多少版本号了,上一步 composer install 是成功的。

曾尝试不做这一步,直接使用,新建了一个 croon.list 的文件 使用

./bin/croon ../croon.list -l croon.log

PHP Fatal error: Class 'Pagon\ChildProcess\ChildProcess' not found in /root/croon/src/Croon/Croon.php on line 36

Fatal error: Class 'Pagon\ChildProcess\ChildProcess' not found in /root/croon/src/Croon/Croon.php on line 36

但是我查找了一下这个文件是存在的,

ls /root/croon/vendor/pagon/childprocess/lib/Pagon/ChildProcess.php

麻烦分析一下是什么问题导致的,我对composer 和 posix 及 pencl 都不是很了解。只是按相关的文档安装上的。

compose install无法通过

composer install --no-dev

Running composer as root/super user is highly discouraged as packages, plugins and scripts cannot always be trusted
Loading composer repositories with package information
Updating dependencies

[Composer\Downloader\TransportException]
Content-Length mismatch

install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] []...

composer diagnose

Running composer as root/super user is highly discouraged as packages, plugins and scripts cannot always be trusted
Checking composer.json: FAIL
require.pagon/eventemitter : unbound version constraints () should be avoided
require.pagon/logger : unbound version constraints (
) should be avoided
require.pagon/argparser : unbound version constraints (*) should be avoided
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: Warning: Accessing packagist.org over http which is an insecure protocol.
OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK

记录LOG日志时的一个BUG

问题出在auto_write,如果不对这个设置值即采用默认的(false),这时候生成的日志会出现好多冗余数据,每一次的写入都会把以前的信息再加起来,好像是把所有的日志累加起来了,后来我尝试把auto_write设置成了 true 发现这个问题就不存在了。

下面是我的一段实际测试命令,通过wc -l 获取log日志的总行数,可以看出区别。

看了看日志功能的代码,功底太浅,被玩的快走火入魔了。。。。还是看不懂。

$ echo ''>cron.log
$ cat cron.list
* * * * * * ls
$ time bin/croon -l cron.log cron.list
^C
real    0m20.111s
user    0m0.359s
sys 0m0.279s
$ wc -l cron.log
     548 cron.log
$ echo ''>cron.log
$ vim bin/croon
$ # 把 auto_write 设置成了 true
$ time bin/croon -l cron.log cron.list
^C
real    0m19.856s
user    0m0.353s
sys 0m0.317s
/Documents/phpcron$ wc -l cron.log
      65 cron.log```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.