diff options
author | friendica <info@friendica.com> | 2015-03-09 19:57:35 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-03-09 19:57:35 -0700 |
commit | 0134a41015dd79092cb6a42ad0f7122d0af9bc6d (patch) | |
tree | 841eaab3a629984ef07fa9900303ae7c4893edae /include/deliver.php | |
parent | ef035a29bc2240ccc497d76eb6e48f2434250082 (diff) | |
download | volse-hubzilla-0134a41015dd79092cb6a42ad0f7122d0af9bc6d.tar.gz volse-hubzilla-0134a41015dd79092cb6a42ad0f7122d0af9bc6d.tar.bz2 volse-hubzilla-0134a41015dd79092cb6a42ad0f7122d0af9bc6d.zip |
more work on queue optimisations
Diffstat (limited to 'include/deliver.php')
-rw-r--r-- | include/deliver.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/deliver.php b/include/deliver.php index 498440271..0fb7a4aeb 100644 --- a/include/deliver.php +++ b/include/deliver.php @@ -20,6 +20,12 @@ function deliver_run($argv, $argc) { dbesc($argv[$x]) ); if($r) { + + /** + * Check to see if we have any recent communications with this hub (in the last month). + * If not, reduce the outq_priority. + */ + $h = parse_url($r[0]['outq_posturl']); if($h) { $base = $h['scheme'] . '://' . $h['host'] . (($h['port']) ? ':' . $h['port'] : ''); @@ -38,6 +44,8 @@ function deliver_run($argv, $argc) { } } + // "post" queue driver - used for diaspora and friendica-over-diaspora communications. + if($r[0]['outq_driver'] === 'post') { $result = z_post_url($r[0]['outq_posturl'],$r[0]['outq_msg']); if($result['success'] && $result['return_code'] < 300) { @@ -92,9 +100,11 @@ function deliver_run($argv, $argc) { logger('deliver: dest: ' . $r[0]['outq_posturl'], LOGGER_DEBUG); $result = zot_zot($r[0]['outq_posturl'],$r[0]['outq_notify']); if($result['success']) { + logger('deliver: remote zot delivery succeeded to ' . $r[0]['outq_posturl']); zot_process_response($r[0]['outq_posturl'],$result, $r[0]); } else { + logger('deliver: remote zot delivery failed to ' . $r[0]['outq_posturl']); $y = q("update outq set outq_updated = '%s' where outq_hash = '%s'", dbesc(datetime_convert()), dbesc($argv[$x]) |