PHP-oriented job or queue manager

I'm looking for a way to manage asynchronous, potentially long-running PHP jobs (ex. feed import and generation). One could start with a simple cron-based system, but this has a few drawbacks :

* Too much 'downtime' if you set the sample interval too long
* Overlapping jobs if jobs don't finish
* No ability to handle events or dependency issues

I've previously used AppWorx ( in a large ETL operation. AppWorx is quite sophisticated with a distributed slave architecture, chains, forks and joins. But AppWorx is probably too complex for my needs.

Setting up slave servers for Hudson

If you're running the Hudson continuous integration server, you may want to run/build/test on multiple slave servers.

To do this, log into the Hudson web interface and go to Hudson > nodes. Configure your new slave server by adding the name, description, remote file system root for Hudson (ex. /var/hudson), and the job launch method.

For job launch method, ssh is fine for Linux based systems. Click the 'Advanced' button to enter ssh details (ex. keys).

Now, when you start up the slave, you may see this in your slave ssh log under the Hudson console output :


Drupal 7 Views 3 column names must be lower case

I'm just getting my feet wet with the Drupal 7, Views 3 hook_views_data API which describes a table to Views.

I had a table like this :

create table tbl(
  myid    varchar(30) COMMENT 'Primary key',
  myPrice float

I was getting an error of this form when I was trying to display the view :

Undefined property: stdClass::$tbl_myPrice in
 views_handler_field_numeric->render() (line 75 of 

Renaming the table to my_price solved the problem.


How to override the "formatting tips" section in Drupal's node creation

Drupal provides some "formatting tips" just before the submit button when creating nodes.

Sometimes you want to override this text to provide your own "tips" for node creation. Here's how to do this :

In your theme's template.php file, add the following function :

function phptemplate_filter_tips($tips, $long = FALSE, $extra = '') {
return 'Your tips here';

Also see this post :


Free SVG Viewer

Adobe has a free SVG viewer here :
They've apparently stopped supporting it, but you can still see the download link at the bottom of the page for WinXP.

For thumbnails from Windows Explorer, I downloaded Renesis Player from here :
You may have to restart Windows Explorer (or even Windows) to get SVG thumbnails generated.


Installing and using Drush Make

Drush and Drush Make are two great utilities for folks who use Drupal.

Here's how to setup and use Drush Make :

Create a ~/.drush directory and download Drush Make to there :

  $ cd
  $ mkdir .drush
  $ cd .drush
  $ wget
  $ tar -xvzf drush_make-6.x-2.0-beta6.tar.gz
  $ cd /var/www/yoursite
  $ cat makeYourWebSite.txt
     core = 7.x 
     projects[] = drupal 
  $ drush make makeYourWebSite.txt


How to mount Windows (SMB) shares on Ubuntu Linux

Here's how to mount SMB (Windows) shares on an Ubuntu system. Most of this assumes you're the root user. You may have to prepend 'sudo' to many commands depending on your situation.

First, you may have to install the following :

- # apt-get install smbfs smbclient

You can do a simple interactive connect with this :

- # smbclient \\\\YOUR_SERVER\\myusername-U myusername -W YOUR_WORKGROUP

This will at least show the SMB share is reachable.

Next, to enable auto-mounting on system start, you'll want to add one of the following to your /etc/fstab file :


DrupalCon SF 2010 Day Two Notes

Batch vs. Queue : An API Smackdown

Drupal 7 will use OO for cache and queue systems.

- createQueue
- createItem
- claimItem
- releaseItem

SystemQueue => MySQL
MemoryQueue => in-memory one request
BatchQueue extends SystemQueue

Use Drush for cron-based batch operations

Use queue to queue for later

I think the "Batch" API is somewhat misnamed. It's intent is to "batch up" and provide feedback DURING AN INTERACTIVE SESSION (ex. upgrading a site). To really batch big jobs, use the Queue API.



Subscribe to RSS - blogs