aboutsummaryrefslogtreecommitdiffstats
path: root/include/poller.php
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'upstream/master'Habeas Codice2014-11-131-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: boot.php include/dba/dba_driver.php include/diaspora.php include/follow.php include/session.php include/zot.php mod/photos.php mod/ping.php
| * revert that bitfriendica2014-11-071-7/+1
| |
| * Provide a way to mark photos as adult and hide them from the default album ↵friendica2014-11-061-4/+10
| | | | | | | | view. Still need a button or setting to enable "unsafe viewing". This has no effect anywhere but in the album views. They can still be viewed by flipping through the individual photos with 'prev' and 'next'. We probably need a comprehensive strategy for how to deal with n-s-f-w photos in albums so consider this a band-aid which requires additional work and integration with other facilities which access these photos. It is entirely optional.
* | PostgreSQL support initial commitHabeas Codice2014-11-131-20/+31
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were 11 main types of changes: - UPDATE's and DELETE's sometimes had LIMIT 1 at the end of them. This is not only non-compliant but it would certainly not do what whoever wrote it thought it would. It is likely this mistake was just copied from Friendica. All of these instances, the LIMIT 1 was simply removed. - Bitwise operations (and even some non-zero int checks) erroneously rely on MySQL implicit integer-boolean conversion in the WHERE clauses. This is non-compliant (and bad programming practice to boot). Proper explicit boolean conversions were added. New queries should use proper conventions. - MySQL has a different operator for bitwise XOR than postgres. Rather than add yet another dba_ func, I converted them to "& ~" ("AND NOT") when turning off, and "|" ("OR") when turning on. There were no true toggles (XOR). New queries should refrain from using XOR when not necessary. - There are several fields which the schema has marked as NOT NULL, but the inserts don't specify them. The reason this works is because mysql totally ignores the constraint and adds an empty text default automatically. Again, non-compliant, obviously. In these cases a default of empty text was added. - Several statements rely on a non-standard MySQL feature (http://dev.mysql.com/doc/refman/5.5/en/group-by-handling.html). These queries can all be rewritten to be standards compliant. Interestingly enough, the newly rewritten standards compliant queries run a zillion times faster, even on MySQL. - A couple of function/operator name translations were needed (RAND/RANDOM, GROUP_CONCAT/STRING_AGG, UTC_NOW, REGEXP/~, ^/#) -- assist functions added in the dba_ - INTERVALs: postgres requires quotes around the value, mysql requires that there are not quotes around the value -- assist functions added in the dba_ - NULL_DATE's -- Postgres does not allow the invalid date '0000-00-00 00:00:00' (there is no such thing as year 0 or month 0 or day 0). We use '0001-01-01 00:00:00' for postgres. Conversions are handled in Zot/item packets automagically by quoting all dates with dbescdate(). - char(##) specifications in the schema creates fields with blank spaces that aren't trimmed in the code. MySQL apparently treats char(##) as varchar(##), again, non-compliant. Since postgres works better with text fields anyway, this ball of bugs was simply side-stepped by using 'text' datatype for all text fields in the postgres schema. varchar was used in a couple of places where it actually seemed appropriate (size constraint), but without rigorously vetting that all of the PHP code actually validates data, new bugs might come out from under the rug. - postgres doesn't store nul bytes and a few other non-printables in text fields, even when quoted. bytea fields were used when storing binary data (photo.data, attach.data). A new dbescbin() function was added to handle this transparently. - postgres does not support LIMIT #,# syntax. All databases support LIMIT # OFFSET # syntax. Statements were updated to be standard. These changes require corresponding changes in the coding standards. Please review those before adding any code going forward. Still on my TODO list: - remove quotes from non-reserved identifiers and make reserved identifiers use dba func for quoting - Rewrite search queries for better results (both MySQL and Postgres)
* TypoThomas Willingham2014-10-211-1/+1
|
* Screwed up merge - put Mike's stuff back.Thomas Willingham2014-10-201-6/+11
|
* Prevent more than one instance of the poller running at a time.Thomas Willingham2014-10-201-12/+19
|
* don't auto-archive connections we can't poll.friendica2014-10-191-6/+11
|
* query for statistics are now executed by pollerPaolo Tacconi2014-10-021-0/+7
|
* provide a way to sync locations and get rid of bogus hublocs, now implementedfriendica2014-09-141-0/+3
|
* one more timefriendica2014-09-081-2/+3
|
* missed onefriendica2014-09-081-2/+5
|
* This is long overdue - use a symblic constant NULL_DATE instead of the ↵friendica2014-09-081-5/+5
| | | | easily mis-typed sequence '0000-00-00 00:00:00'
* implement service class for feed polling frequenecy, fixed a service class ↵friendica2014-09-031-2/+3
| | | | bug, moved service class stuff from plugin to account.php where it belongs and load that by default instead of on demand
* Merge remote-tracking branch 'upstream/master'Thomas Willingham2014-09-021-1/+14
|\
| * get out the sunniesfriendica2014-08-311-1/+14
| |
* | Add check_upstream_directory() to check that your directory is stillThomas Willingham2014-08-311-0/+3
|/ | | | | a directory, and if it isn't, let find_upstream_directory() find you a new one.
* allow a site to run cron daily at a chosen hourfriendica2014-07-161-3/+17
|
* doc updatesfriendica2014-06-061-1/+9
|
* bring back birthdaysfriendica2014-06-021-0/+2
|
* cleanup dead directory entries. This was a real b#tch, so keep your eye out ↵friendica2014-05-281-1/+2
| | | | for issues - which you shouldn't see until next weekend when this is scheduled to run. We're only setting flags, so if anything goes wrong we should be able to recover without too much pain.
* Default discover to on.Thomas Willingham2014-03-301-1/+1
|
* Let the site admin choose whether to display the Discover tab.Alexandre Hannud Abdo2014-03-301-1/+2
|
* firehose fixes and optimisations. In particular get rid of the unresponsive ↵friendica2014-03-271-23/+2
| | | | script warning when trying to load updates (sine they aren't our posts, we can't check for unseen, hence we can't really load updates). Also make the url selection pluggable.
* firehose testing (network?f=&fh=1) - some possible security bugs so testing ↵friendica2014-03-261-0/+1
| | | | purposes only
* let's limit this to two weeks so it doesn't pound servers and waste too much ↵friendica2014-03-261-1/+1
| | | | space
* more work on firehosefriendica2014-03-261-0/+24
|
* prune_hub_reinstalls() and add cron weekly as a side effectfriendica2014-03-191-0/+17
|
* change flags for one-way connections from hidden to unconnected so we can ↵friendica2014-03-041-6/+3
| | | | still use hidden for - well hiding connections
* enable network/matrix expiration, this should be functional but the options ↵friendica2014-03-031-2/+7
| | | | have been reduced/restricted so we're only looking at network posts and ignore anything that is filed, starred, or is resource_type 'photo' (which should not be possible in non-wall posts, but we just want to be sure). Will require the adventurous tester(s) to set 'channel_expire_days' in their channel record.
* Typocvogeley2014-02-271-1/+1
|
* service class downgrade to the default service class on account expiration ↵friendica2014-02-181-10/+3
| | | | if using a non-default service class and account has expired.
* move expiration of notifications to the equivalent of "cron daily" to try ↵friendica2014-02-111-9/+10
| | | | and reduce the number of things the poller has to do on every run.
* Merge https://github.com/friendica/red into zpullfriendica2014-02-111-1/+5
|\
| * Clear out old notifications in the poller.Thomas Willingham2014-02-111-1/+5
| |
* | implement a forced directory update mode where we unconditionally create a ↵friendica2014-02-111-1/+1
|/ | | | directory sync packet. This is needed to ensure that monthly directory pings are propagated to other directory servers so they can each prove for themselves whether or not an account is alive or dead. We do not trust other directories to provide us information beyond "look at this entry and decide for yourself" as doing otherwise would invite rogue directory manipulations. As this scheduled update occurs on all channels across all servers, we should also pick up refresh messages from all existing channel clones and these should also propagate out to all directory servers using the same mechanism (though perhaps not at the same time).
* reversed args in update_modtime, incorrect ud_guid and ud_hashfriendica2014-02-101-1/+1
|
* populate some posts when somebody is granted "read stream" permissionfriendica2013-11-171-0/+3
|
* we should probably only expire things once...friendica2013-11-071-1/+4
|
* provide expire feature on post and comments as well as private messages. ↵friendica2013-11-071-1/+7
| | | | This requires a feature setting and is currently unmaskable - if the author says it's gone, there's not a lot you can do to stop it or try and save it. It's gone.
* allow private mail sender to set an expiration on their messages. Once ↵friendica2013-11-061-0/+5
| | | | expired the message is destroyed at both ends (subject to the granularity of the polling interval) and is gone. Officially it takes some form of language independent string like 2013/11/22, but English speakers can use anything that strtotime() understands, like "+30 minutes" or "next Tuesday".
* implement monthly directory pingsfriendica2013-10-281-3/+18
|
* directory sync optimisations to save redundant processingfriendica2013-10-151-1/+1
|
* why do these have invalid id's?friendica2013-10-141-1/+1
|
* sync tweaksfriendica2013-10-141-1/+1
|
* directory sync typofriendica2013-10-021-1/+1
|
* directory sync - this will either work, or it won't work, or it will ↵friendica2013-09-301-54/+74
| | | | | | | | | possibly recurse and blow up the matrix. Hard to say. Do you feel lucky? Well do ya' ... punk? Rule #1 - don't mess with anything unless it's blowing up the matrix. If it doesn't blow up the matrix, but doesn't work, just let it go and let's figure out what it is doing and what it isn't doing. The flow is as follows: Once a day go out to all the directory servers besides yourself and grab a list of updates. This happens in the poller. If we've never seen them before add them to the updates table. The poller also looks to see if we're a directory server and have updates that haven't yet been processed. It calls onedirsync.php to process each one. If we contact the channel to update and don't find anything (we're just doing a basic zot_finger), set a ud_last timestamp. If this is set we will only try once a day for seven days. Then we stop trying to update. This will probably cause a spike the first time through because you haven't seen any updates before, but we spread out the load over your delivery interval.
* No point beating a dead horsefriendica2013-09-121-1/+8
|
* figure out why poller isn't picking up old posts which failed to deliverfriendica2013-08-291-1/+1
|
* issues marking for deathfriendica2013-08-151-14/+15
|