Giter VIP home page Giter VIP logo

beanstalk_console's Introduction

Beanstalk console English version

Latest Stable Version Total Downloads License

Admin console for Beanstalk queue server, written in PHP

Beanstalk Console Screenshot

Features

  • Common list of servers in config for all users + optional Basic Auth
  • Global server list can be set via BEANSTALK_SERVERS environment variable
  • Each user can add its own personal Beanstalkd server
  • Full list of available tubes
  • Complete statistics about jobs in tubes
  • Realtime auto-update with highlighting of changed values
  • You can view jobs in ready/delayed/buried states in every tube
  • You can add/kick/delete jobs in every tube
  • You can select multiple tubes by regExp and clear them
  • You can move jobs between tubes
  • Ability to Pause tubes
  • Saved jobs (store sample jobs as a template, kick/edit them, very useful for development)
  • Search jobs data field
  • Customizable UI (code highlighter, choose columns, edit auto refresh seconds, pause tube seconds)

Change log on Releases.

Installation

Use composer (recommended)

If you don't have Composer yet, download it following the instructions on http://getcomposer.org/ or just run the following command:

curl -s http://getcomposer.org/installer | php

Then, use the create-project command to generate a new application:

php composer.phar create-project ptrofimov/beanstalk_console -s dev path/to/install

Composer will install the Beanstalk Console and all its dependencies under the path/to/install directory.

Setup using vagrant

Install VirtualBox and vagrant then run (from project root):

vagrant up

After provision beanstalk console will be available at http://localhost:7654 (port could be configured in Vagrantfile)

Download an Archive File

Download, unzip files to your www directory and launch from public directory, enjoy!

Run as a Docker container

Install Docker then build and run with the following command (from project root):

docker build --rm -t beanstalk_console .
docker run -d -p "80:80" --name beanstalk_console beanstalk_console

If you would rather just run the existing automated build of this project, run (from project root):

docker run -d -p "80:80" -e APACHE_PORT=80 --name beanstalk_console agaveapi/beanstalkd-console

To configure webapp with a custom beanstalk server to load at runtime, set the BEANSTALKD_HOST and BEANSTALKD_PORT environment variables.

docker run -d -p 80:80 \
           --name beanstalk_console \
           -e 'BEANSTALKD_HOST=beanstalkd' \
           -e 'BEANSTALKD_PORT=11300' \
           beanstalk_console

To spin up a console with a beanstalkd server all at once, install Docker Compose and run (from project root):

docker-compose up

Authors: Petr Trofimov, Sergey Lysenko, Pentium10


Beanstalk консоль Русская версия

Административная консоль для сервера очередей Beanstalk, написанная на PHP

Возможности

  • Общий список серверов в конфиге для всех пользователей
  • Глобальный список серверов может быть установлен через переменную окружения BEANSTALK_SERVERS
  • Каждый пользователь может добавить свой персональный сервер
  • Полный список доступных труб
  • Полная статистика тасков в трубах
  • Realtime-обновление с подсветкой изменившихся значений
  • Вы можете просматривать таски в каждой трубе (ready/delayed/buried)
  • Вы можете выполнять операции с тасками в каждой трубе (add/kick/delete)

Установка

Скачайте, положите распакованные файлы в www папку и наслаждайтесь!

Установка с помощью vagrant

Установите VirtualBox и vagrant затем запустите (в корневой директории проекта):

vagrant up

После завершения провизии консоль будет доступна по адресу http://localhost:7654 (порт можно сконфигурировать в Vagrantfile)

Авторы: Петр Трофимов, Сергей Лысенко, Pentium10


** Previous version is available here**

Keywords: beanstalk, beanstalkd, queue, console, gui, admin, web admin, monitoring, stats, interface, php

beanstalk_console's People

Contributors

aivus avatar boo1ean avatar byjg avatar daycry avatar deardooley avatar drull755 avatar fanis avatar huglester avatar johncongdon avatar krzaczek avatar mbarth avatar mjaschen avatar mkopinsky avatar mmenozzi avatar natsu90 avatar nav-prak avatar needcaffeine avatar noobpk avatar nyirocsaba avatar pentium10 avatar prgtw avatar ptrofimov avatar rjocoleman avatar schmdt avatar shaunpud avatar sporchia avatar steenschutt avatar thwarted avatar tsmgeek avatar zekiunal 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  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

beanstalk_console's Issues

Unable to connect to server - The server is unavailable

I'm having troubles trying to connect my local homestead instance (which is Laravel's Vagrant environment) and I'm unable to connect the Beanstalkd Console to my server instance.

I also followed Jeffery Way's tutorial like issue 58 and was unable to get either any errors to show up using error_reporting(0) or any connection to my Homestead server.

I also see the php warning when I click on 'All Tubes'

Notice: Undefined variable: tubes in [...]/beanstalk_console/lib/tpl/main.php on line 90

It appears that the previous ticket has been closed, but I'm still experiencing troubles.

I did a fresh install using composer of the Beanstalkd Console (version 1.7) and got it serving pages using

vagrant up

Any idea why I might be having troubles?

Thanks

typo in readme

Composer will install the Beanstalk Cosnole and ...
Should be Composer will install the Beanstalk CoNSole and :)

IPv6 address literals are not handled well

If the servers config option includes IPv6 address literals like '[::1]:11300' or [fe80::800:27ff:fe00:0%eth0]:11300, beanstalk_console can not connect. This is because BeanstalkInterface __construct is naive in parsing the server address. I hacked up a serious kludge to take the last element of the exploded result as the port, to verify that it would work, but that code is too ugly to productionize.

It may be better to take URL-like values as the server list, like beanstalk://host:port/ (this is what the backburner library does. Then parse_url can be used to extract the necessary components unambiguously. Maybe maintain backwards compatibility by using parse_url if the string starts with beanstalk://?

Note that it has no trouble connecting over IPv6 if the address or name can be parsed correctly (specifically, giving a name that only resolves to an IPv6 address or AAAA records does work).

Errors that cause HHVM to crash

These show up in the logs every time i refresh the page using HHVM. When this happens only the toolbar will show up in the output, the stats is blank. After a restart of HHVM it will work for a while and then the same cycle happens again.

Notice: Undefined variable: contentType in /path/to/dir/lib/tpl/main.php on line 15
Notice: Undefined variable: _tplPage in /path/to/dir/lib/tpl/main.php on line 132
Warning: File not found:/path/to/dir/lib/tpl/.php in /path/to/dir/lib/tpl/main.php on line 132

Auto refresh doesn't seem to work

It seems to me the auto-refresh feature does not work or is not implemented yet.

I reproduced the issue with the Composer install as well as the last commit git checkout.

Headers already send

After deleting a record from the tube this error shows up. Clicking on "Click to open" doesn't do anything.

Unserialize got a fatal error, please include the necessary files, or deactivate unserialization from Settings (click to open)

Warning: Cannot modify header information - headers already sent by (output started at /home/beanconsole/lib/BeanstalkInterface.class.php:255) in /home/beanconsole/lib/include.php on line 414

Fatal error: Uncaught exception 'Pheanstalk_Exception_ServerException' with message 'Unhandled response: HTTP/1.1 400 Bad Request'

Hi,

Why do I get this:

Fatal error: Uncaught exception 'Pheanstalk_Exception_ServerException' with message 'Unhandled response: HTTP/1.1 400 Bad Request' in /Users/pmdg3/Desktop/development/beanstalk_console/lib/Pheanstalk/YamlResponseParser.php:43 Stack trace: #0 /Users/pmdg3/Desktop/development/beanstalk_console/lib/Pheanstalk/Connection.php(120): Pheanstalk_YamlResponseParser->parseResponse('HTTP/1.1 400 Ba...', NULL) #1 /Users/pmdg3/Desktop/development/beanstalk_console/lib/Pheanstalk.php(364): Pheanstalk_Connection->dispatchCommand(Object(Pheanstalk_Command_StatsCommand)) #2 /Users/pmdg3/Desktop/development/beanstalk_console/lib/Pheanstalk.php(311): Pheanstalk->_dispatch(Object(Pheanstalk_Command_StatsCommand)) #3 /Users/pmdg3/Desktop/development/beanstalk_console/lib/BeanstalkInterface.class.php(73): Pheanstalk->stats() #4 /Users/pmdg3/Desktop/development/beanstalk_console/lib/include.php(46): BeanstalkInterface->getServerStats() #5 /Users/pmdg3/Desktop/development/beanstalk_console/lib/tpl/serversList.php(22): Console->getServerStats('ex in /Users/pmdg3/Desktop/development/beanstalk_console/lib/Pheanstalk/YamlResponseParser.php on line 43
name

Browser view:
http://grab.by/yJ1A

Thanks

Error on tube view

When you try to view the tube there is a warning:

Warning: Invalid argument supplied for foreach() in /var/www/lib/tpl/currentTubeJobsShowcase.php on line 2

Several browser refreshes help - there is some change that this warning does not appear. But this is really annoying.

You could check if array is ok (not null for example) before using it in foreach:

<?php if ($peek) foreach ($peek as $state => $job): ?>

No Licence

Hi Guys, what licence is your code released under? You don't have a licence under version control, or mentioned in the README.md.

Thanks,

Understanding the interface

I am not sure where to find support for this, please check this image of my console
beanstalk

I'm not sure what the total-jobs column means? First I thought it was completed jobs but reading your tooltip
"cumulative count of jobs created in this tube in the current beanstalkd process"
sounds like I have 400+ jobs in memory hung up in some sort of infinity state? how can I see the jobs "in the process"

also is current using + current watching mean there are 5 processes trying to work through this?

Moving delayed jobs is buggy.

The "Move all _____ jobs" button does not work correctly for delayed jobs. There's a good reason for this.

In the code we currently copy over a job's contents to the new tube, then delete the job from the old tube. However, this will not work for delayed jobs. The protocol diagram shows us that deleting delayed jobs is not a valid operation. So correctly we should actually do things in the following order:

  • copy the job data and insert a new job into the new tube with the same priority, delay, and ttr.
  • kick the original job (which will cause it to become ready)
  • delete the original job

Q: Laravel + beanstalk_console

Hi there,

I have a general question, which I hope you could help me with.

I'm trying to manage Laravel Job Queue via beanstalk_console, and everything seem to be great when it comes to monitoring, except for when I kick buried jobs. I'm burying jobs that actually fail in Laravel, which means - they can't be executed successfully. I bury them for the purpose of investigating the issue and then re-starting after the issue is fixed. When I kick a buried failed job from beanstalk_console - it looks like it gets processed and then deleted from the queue. The problem is, it's still a failing job, it's supposed to get buried again, but that doesn't happen. Any ideas why would it be happening?

Tubes Not Persisting on Page Update

I don't know why and don't see any articles related to this kind of issue with the beanstalkd itself, but when i add a job to a tube that isn't default, the tube appears then after the job is complete it disappears.

updateTable() breaks when new tube is added

The updateTable function in customer.js iterates through all the td elements in the new table, and compares them to the old table.
This means that when the new table has more td elements than the old (as when a new Tube has been created since the last update), an index out of bounds occurs on line 205.

Also, the background color animation this function applies does not appear to work for me in Firefox 20 on Windows 7.

how to set up autoloading for serialized classes in jobs?

I'm using serialized PHP objects as job data, which works fine if I edit index.php to include the composer autoloader from the project containing those classes. Is there a better way to include arbitrary paths into the autoloading for beanstalk_console so it can display these things properly?

Job Queue not showing up

Hello, I have been using beanstalk console from long time, and now suddenly its not showing my job queues in console. Is there something I have to do? Please let me know.

Laravel / pheanstalk / Beanstalkd Error : Undefined Variable in tubes

I keep on coming across this error and I am unable to add a server to the console screen The error occurs when I run php -S localhost:7654 -t public.

PHP Notice: Undefined variable: tubes in /Users/myfilename/Code/beanstalk_console/lib/tpl/main.php on line 90

Do you have any idea what the cause it I have tried uninstalling and reinstalling many times but this hasn't worked. Beanstalk Queues are OK I can add to the queue and run php artisan queue:work no problem

Notice: Undefined variable: tubes in [...]/beanstalk_console/lib/tpl/main.php on line 90

Keep getting errors, I don't know how to fix.

Notice: Undefined variable: tubes in [...]/beanstalk_console/lib/tpl/main.php on line 90

and

Warning: Invalid argument supplied for foreach() in [...]/beanstalk_console/lib/tpl/main.php on line 90

I'm running this on "localhost:7654" and the laravel app I'm using is at "pony.dev" both obviously on my local machine. However pony.dev is a VM using vaprobash, and localhost is just being served up with php -S.

Any help would be greatly appreciated.

saved servers link goes to the wrong URL

If I save a server (via the upper right hand "Add server" button), and then select a saved server from the dropdown menu, the URI used is:

http:/host:port/public/?server=serverhost:serverport

when it actually needs to be:

http://host:port/public/index.php?server=serverhost:serverport

Attempting to install but getting an error

executed the following and received an error. Environment is Ubuntu 14.04 LTS

/home/username/$curl -s http://getcomposer.org/installer | php
/home/username/$mkdir beanstalk_console/
/home/username/$php composer.phar create-project ptrofimov/beanstalk_console -s dev beanstalk_console/

getting the following from the last command:

vagrant@ubuntu-14:~$ php composer.phar create-project ptrofimov/beanstalk_console -s dev beanstalk_console/



  [Composer\Downloader\TransportException]                                     
  The "https://packagist.org/packages.json" file could not be downloaded: php  
  _network_getaddresses: getaddrinfo failed: Name or service not known         
  failed to open stream: php_network_getaddresses: getaddrinfo failed: Name o  
  r service not known     

Using beanstalk_console as dependency

When using beanstalk console as a dependency (via composer require) the way the config file is included breaks "other" configuration.

Instead if the configuration gets merged it will work as expected:

if (isset($GLOBALS['config'])) {
    $GLOBALS['config'] = array_merge_recursive([
        /**
         * List of servers available for all users
         */
        'servers' => array(/* 'Local Beanstalkd' => 'beanstalk://localhost:11300', ... */),
        /**
         * Saved samples jobs are kept in this file, must be writable
         */
        'storage' => dirname(__FILE__) . DIRECTORY_SEPARATOR . 'storage.json',
        /**
         * Optional Basic Authentication
         */
        'auth' => array(
            'enabled' => false,
            'username' => 'admin',
            'password' => 'password',
        ),
        /**
         * Version number
         */
        'version' => '1.7.4',
    ], $GLOBALS['config'])
}

Error after press "Delete all ready jobs"

beanstalk_console 1.5.2

  1. Add some jobs.
  2. Open tube ("default" in my case).
  3. Press "Delete all ready jobs".
  4. Got "NOT_FOUND: There are no jobs in the 'ready' status".
  5. Go back — no ready jobs.

So, jobs has been deleted, but then something went wrong.

HTTP Error 500 (Internal Server Error):

When trying to view a particular tube, the page throws a 500 error. I'm unable to see the actual error in apache, message or php error log.

I'm able to view the main page (beanstalk/public/?server=localhost:11300), however viewing a tube does not work. (beanstalk/public/?server=localhost:11300&tube=default).

Do you have any ideas? Thanks.

Sam

refresh in tube view

The view showing a specific tube doesn't appear to refresh the count as the main "tubes" page does. Is this as designed, and if so are there plans to implement the auto-refresh in the tube view?
Thanks

Remove all jobs does not work

I made my beanstalkd persistent (option -b) and now it is not possible to clear all the jobs. Is this a bug, or is this not possible?

Error: "No input file specified"

Having followed the instructions to install this monitor on a fresh Homestead install I am navigating to the public folder as per instructions in a web browser but I'm encountering and error

No input file specified

Which has thrown me somewhat because there are no obvious configuration options for an input file. Can someone help me on this? Thanks

Tubes show and disappear

I'm using beanstalk with laravel. Not sure why the second and third tube keeps flashing on and off. and they automatically reset the total job. is there anyway we can make those tubes stay permanently as the first tube does. Thank you

image

Ability to name servers

In the servers configuration list, we actually have something like:

'servers' => array(
  'beanstalk://192.168.1.48:12100',
  'beanstalk://10.10.0.12:13500'
  // Etc
)

Actually it is difficult to make the difference on the beanstalk console web interface when there are a bunch of servers.

It would be awesome to name servers like this:

'servers' => array(
  'Local VM' => 'beanstalk://192.168.1.48:12100',
  'Client VM' => 'beanstalk://10.10.0.12:13500'
  // Etc
)

And use these keys as label. Or:

'servers' => array(
  array('Local VM', 'beanstalk://192.168.1.48:12100'),
  array('Client VM', 'beanstalk://10.10.0.12:13500')
  // Etc
)

Or more verbosely:

'servers' => array(
  array(
    'name' => 'Local VM',
    'host' => 'beanstalk://192.168.1.48:12100'
  ),
  array(
    'name' => 'Client VM',
    'host' => 'beanstalk://10.10.0.12:13500'
  )
  // Etc
)

Unserialize causes die

In BeanstalkInterface.class.php the script tries to unserialize the message. If you send a serialized object into beanstalk which is not an instance of a built-in class, beanstalk_console dies without any errors.

I don't know what is the original purpose of this unserialization thing but I think it's really dangerous.

add a bury ready button

add the following

*in /lib/include.php:

   protected function _actionBury()
    {
            $this->interface->buryReady( $this->_globalVar[ 'tube' ] );
            header(
                    sprintf( 'Location: index.php?server=%s&tube=%s', $this->_globalVar[ 'server' ],
                            $this->_globalVar[ 'tube' ] ) );
            exit();
    }

*in /lib/BeanstalkInterface.class.php:

    public function buryReady( $tube )
    {
            $job = $this->_client->useTube( $tube )->peekReady();
            $this->_client->reserve();
            $this->_client->bury( $job );
    }
  • then add a button in /lib/tpl/currentTube.php
    ( I was too lazy to actually set an icon for it so I reused the trash can )

     <a class="btn btn-danger btn-small" href="?server=<?=$server?>&tube=<?=$tube?>&action=bury"><i class="icon-trash icon-white"></i> bury next ready job</a>
    

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.