The Asynchronous Processing will separate the Drupal task to mutil-process (as background process ).

It could be used for executing long-running tasks in the background, such as tasks involving significant network activity or encoding video, send an email etc..

It could be used for executing long-running tasks in the background, such as tasks involving significant network activity or encoding video, send an email etc.

Comments

taducphuong83’s picture

Forget add the link of the sanbox:
http://drupal.org/sandbox/taducphuong/1135178

joachim’s picture

Status: Needs review » Needs work

Interesting idea!

You should run your module through Coder and review the code formatting guidelines.

> DEFINE( 'ROOT_DIR', $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . [YOUR SETUP FOLDER]);
> DEFINE( 'BASE_URL2', 'http://your-website.com');

I don't think either of these are needed though -- those values are already available in Drupal, surely?

> drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

If you're fully boostrapping Drupal, what is the gain from having a new file in the web root? Why not use a menu path.

taducphuong83’s picture

Thanks for your review !
I need define the ROOT_DIR and BASE_URL because I execute the php by php command ( in Window or Linux ).
So, the variable global $base_url will not similar when we use the http request.

"If you're fully boostrapping Drupal, what is the gain from having a new file in the web root? Why not use a menu path." ==> I think this is great idea. I will correct this and commit the new source file soon.

Thanks

joachim’s picture

> I need define the ROOT_DIR and BASE_URL because I execute the php by php command ( in Window or Linux ).

In that case, you should look at doing this part as a Drush plugin.

taducphuong83’s picture

Component: new project application » module

Thanks so much for your comments.
I updated Asynchronous_processing module to make it easier to install:
- No need define of ROOT_DIR and BASE_URL from settings.php file anymore.
- No need copy asynchronous_processing.php to root folder.

About "Drush plugin" had another idea with this module, so I will not use it for this module.

taducphuong83’s picture

Status: Needs work » Needs review

I've make the correction of asynchronous_processing.php.

joachim’s picture

Status: Needs review » Needs work

If you're doing anything with queues on Drupal 7, you should be using the Queue API: http://api.drupal.org/api/drupal/modules--system--system.queue.inc/group...

Also, I see little evidence of following Drupal coding standards:

- docblocks not formatted correctly
- spacing and indentation incorrect
- typos in comments and variable names
- incorrect formatting of variable names and constants

I'm afraid this module needs much more work before it can be considered for full project status.

tim.plunkett’s picture

Status: Needs work » Closed (won't fix)

Closing, feel free to re-open if this was a mistake.