diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-12-14 22:44:05 -0800 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-12-14 22:44:05 -0800 |
commit | b13241564b994762e5c1a4747f74acc6cd27adf5 (patch) | |
tree | 3d01d7a2307075b4db29f1b23c85bfcdbf5637ec /include/directory.php | |
parent | 76816de3aae832d68be6d8f2b32ff7b910792002 (diff) | |
download | volse-hubzilla-b13241564b994762e5c1a4747f74acc6cd27adf5.tar.gz volse-hubzilla-b13241564b994762e5c1a4747f74acc6cd27adf5.tar.bz2 volse-hubzilla-b13241564b994762e5c1a4747f74acc6cd27adf5.zip |
more work on queue api
Diffstat (limited to 'include/directory.php')
-rw-r--r-- | include/directory.php | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/include/directory.php b/include/directory.php index 9ab1d805b..8792a15e1 100644 --- a/include/directory.php +++ b/include/directory.php @@ -8,6 +8,7 @@ require_once('boot.php'); require_once('include/zot.php'); require_once('include/cli_startup.php'); require_once('include/dir_fns.php'); +require_once('include/queue_fn.php'); /** * @brief @@ -83,20 +84,17 @@ function directory_run($argv, $argc){ */ $hash = random_string(); - q("insert into outq ( outq_hash, outq_account, outq_channel, outq_driver, outq_posturl, outq_async, outq_created, outq_updated, outq_notify, outq_msg ) - values ( '%s', %d, %d, '%s', '%s', %d, '%s', '%s', '%s', '%s' )", - dbesc($hash), - intval($channel['channel_account_id']), - intval($channel['channel_id']), - dbesc('zot'), - dbesc($url), - intval(1), - dbesc(datetime_convert()), - dbesc(datetime_convert()), - dbesc($packet), - dbesc('') - ); - } else { + + queue_insert(array( + 'hash' => $hash, + 'account_id' => $channel['channel_account_id'], + 'channel_id' => $channel['channel_id'], + 'posturl' => $url, + 'notify' => $packet, + )); + + } + else { q("update channel set channel_dirdate = '%s' where channel_id = %d", dbesc(datetime_convert()), intval($channel['channel_id']) |