»

LJ::cmd_buffer_add

LJ::cmd_buffer_add — Schedules some command to be run sometime in the future which would be too slow to do syncronously with the web request. An example is deleting a journal entry, which requires recursing through a lot of tables and deleting all the appropriate stuff.

Use

LJ::cmd_buffer_add(db, journalid, cmd, hargs);

Arguments

  • db. Cluster master db handle to run command on.

  • journalid. Journal id command affects. This is indexed in the cmdbuffer table so that all of a user's queued actions can be run before that user is potentially moved between clusters.

  • cmd. Text of the command name. 30 chars max.

  • hargs. Hashref of command arguments.

Source:

cgi-bin/ljlib.pl