Giter VIP home page Giter VIP logo

beany's Introduction

Hello, I'm Hayden ๐Ÿ‘‹

I'm a Director of Engineering working on a bunch of cool security projects at Netcraft.

Reach me at [email protected]

beany's People

Contributors

crystalix007 avatar eskriett avatar jamespwilliams avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

beany's Issues

Beany segfaults if trying to connect to an invalid server

When trying to connect to a server, if that server isn't valid (for example, if mis-spelling the server name), beany segfaults:

[default] >>> connect foobar
dial tcp: lookup foobar on 194.72.238.4:53: no such host
Connected to 'foobar:11300'
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x54fe7a]

goroutine 1 [running]:
main.(*server).CurrentTubeName(...)
	/home/hayden/go/src/github.com/eskriett/beany/server.go:57
main.(*cli).setPrompt(0xc42007e770)
	/home/hayden/go/src/github.com/eskriett/beany/cli.go:553 +0x11a
main.(*cli).addConnectCmd.func1(0xc420084c30)
	/home/hayden/go/src/github.com/eskriett/beany/cli.go:100 +0xa1
github.com/abiosoft/ishell.(*Shell).handleCommand(0xc4200e2000, 0xc42009a660, 0x2, 0x2, 0xc420055e08, 0xc420055e10, 0x20)
	/home/hayden/go/src/github.com/abiosoft/ishell/ishell.go:250 +0x2cc
github.com/abiosoft/ishell.handleInput(0xc4200e2000, 0xc42009a660, 0x2, 0x2, 0xc42007ec70, 0xc42006ea20)
	/home/hayden/go/src/github.com/abiosoft/ishell/ishell.go:204 +0x4d
github.com/abiosoft/ishell.(*Shell).run(0xc4200e2000)
	/home/hayden/go/src/github.com/abiosoft/ishell/ishell.go:183 +0x228
github.com/abiosoft/ishell.(*Shell).Run(0xc4200e2000)
	/home/hayden/go/src/github.com/abiosoft/ishell/ishell.go:99 +0x39
main.(*cli).Run(0xc42007e770)
	/home/hayden/go/src/github.com/eskriett/beany/cli.go:543 +0x2f
main.main()
	/home/hayden/go/src/github.com/eskriett/beany/beany.go:25 +

Allow chaining of commands, and allow using beany to delete jobs non-interactively

It would be useful to chain commands. This is primarily to allow you to use beany to connect to a remote beanstalk server, and then run a command on that remote beanstalk sever:

$ beany connect some_server
Connected to 'some_server:11300'
$ beany connect some_server list
strconv.Atoi: parsing "list": invalid syntax
$ beany 'connect some_server; list'
2020/08/07 11:20:31 incorrect input, try 'help'

It would also be useful to delete jobs non-interactively:

$ beany delete-ready some_tube
Are you sure you want to delete all ready jobs from the some_tube tube [yn]? y
Deleted 10 ready jobs
$ beany delete-ready some_tube -y
Too many arguments provided

Beany delete-ready can't clear entire large backlogs

Today I went to clear a rather large 600k backlog using beany. However, while using delete-ready on a different machine to the beanstalk server, it could only manage to delete about 2k jobs per invocation. When I then connected to the beanstalk server and ran beany there it managed to delete about 25k jobs per invocation. Ultimately I just repeatedly called delete-ready until the backlog was cleared. This tube is somewhat busy, so perhaps that is related?

I haven't tested it myself, but perhaps delete-delayed and delete-buried are similarly affected?

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.