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/ratenotif.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/ratenotif.php')
-rw-r--r-- | include/ratenotif.php | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/include/ratenotif.php b/include/ratenotif.php index 63fd7c2ee..e94f30247 100644 --- a/include/ratenotif.php +++ b/include/ratenotif.php @@ -82,18 +82,14 @@ function ratenotif_run($argv, $argc){ $hash = random_string(); $n = zot_build_packet($channel,'notify',null,null,$hash); - 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($h . '/post'), - intval(1), - dbesc(datetime_convert()), - dbesc(datetime_convert()), - dbesc($n), - dbesc(json_encode($encoded_item)) - ); + queue_insert(array( + 'hash' => $hash, + 'account_id' => $channel['channel_account_id'], + 'channel_id' => $channel['channel_id'], + 'posturl' => $h . '/post', + 'notify' => $n, + 'msg' => json_encode($encoded_item) + )); $deliver[] = $hash; |