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 synchronously 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. Global db handle to run command on, or user clusterid if cluster

  • 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