Commit graph

267 commits

Author SHA1 Message Date
Philipp Holzer 38f70cc55a
Refactor Process for new paradigm 2021-11-05 20:52:28 +01:00
Michael 63da4a75e9 The boot.php had been cleared of most functions 2021-11-04 20:29:59 +00:00
Hypolite Petovan f80478f262 Improve argument handling in Core\Worker::add
- The argument name made it unclear the first argument is supposed to be a priority number
2021-10-16 19:19:56 -04:00
Michael 27b9da3df5 replace "p" with higher level database functions 2021-10-12 05:53:29 +00:00
Hypolite Petovan 6db211568a Remove most calls to date_default_timezone_* calls
- It was wrongly used to set the node-wide ot user-specific timezone
- It is now fully managed from the App object
- Add a static variable to DateTimeFormat maintain the convenient local() method
2021-10-03 13:42:31 -04:00
Michael 2951243b07 Preparation for delayed posts 2021-07-28 22:22:00 +00:00
Michael 0bbe954316 Getter/Setter for queue 2021-07-24 22:08:33 +00:00
Balázs Úr 054c301ef0 Update copyright 2021-03-29 08:40:20 +02:00
Michael adb0b460ef Fixes PHP Warning: " array_unshift() expects parameter 1 to be array, int given" 2021-03-24 19:52:53 +00:00
Michael df135c31fe Merge remote-tracking branch 'upstream/develop' into no-frontend-worker 2021-01-07 10:44:12 +00:00
Michael 594b1a75b5 Use the correct pid 2021-01-05 21:48:29 +00:00
Michael 6ef0f9646f Set the new pid 2021-01-05 21:39:53 +00:00
Michael 2f8e873cc7 Wait for parent 2021-01-05 16:47:55 +00:00
Michael 17fbe5c299 Delete IPC entries 2021-01-05 16:01:05 +00:00
Michael 7e89bf5af8 Wait for child being ready 2021-01-05 10:18:25 +00:00
Michael 69c7e9af20 Let the worker run for an hour in daemon mode 2021-01-04 09:20:44 +00:00
Michael 74d7d7e164 Check for childf status 2021-01-03 22:57:25 +00:00
Michael d70d180e4b Merge remote-tracking branch 'upstream/2020.12-rc' into fork 2021-01-03 10:06:17 +00:00
Michael 10b035b51a Additional worker cooldown 2021-01-02 19:33:50 +00:00
Michael 7a03b72060 Improved daemon test 2021-01-02 08:43:55 +00:00
Michael 78f67c1e0e Check for reaching the memory limit 2021-01-01 23:10:38 +00:00
Michael a81ac835a1 The frontend worker is removed 2021-01-01 23:05:26 +00:00
Michael 9a6141dcbe Use "pcntl_fork" to fork processes 2021-01-01 19:35:29 +00:00
Michael d1ea529cfb Issue 9704: Improved log levels 2020-12-31 20:14:13 +00:00
Michael Vogel 33930b0bd9
Apply suggestions from code review
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
2020-12-09 06:58:19 +01:00
Michael dd94fb1242 Check for bad worker priorities 2020-12-08 21:58:32 +00:00
Michael edbdfbae6b workerqueue now has a "command" field 2020-12-03 15:47:50 +00:00
Michael 3f3f56db57 Poll interval function moved to feed class, first steps for delayed posts 2020-11-30 05:39:12 +00:00
Michael 818c064c0a The notifications parameters are now simplified 2020-11-25 19:56:39 +00:00
Michael 1bc76fdb6d Watchdog mode to check if the daemon is running 2020-11-20 19:50:08 +00:00
Michael 0edc058a17 Ensure that the daemon is called faster and more reliably 2020-11-18 13:29:10 +00:00
Michael 592ac53ffc Worker priority / no shadow worker 2020-10-24 08:05:03 +00:00
Philipp Holzer a6fc9cd32e
Remove $binary flag for HTTPRequest::get(), HTTPRequest::fetch(), HTTPRequest::fetchAll() (deprecated since PHP 5.1.3) 2020-10-18 20:56:31 +02:00
Michael Vogel 2c0db7546b
Update src/Core/Worker.php
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
2020-10-17 15:54:52 +02:00
Michael 7efd01880c Define a maintenance window 2020-10-17 12:39:42 +00:00
Hypolite Petovan a852455d0e Merge remote-tracking branch 'friendica/stable' into develop
# Conflicts:
#	composer.lock
2020-09-20 15:32:58 -04:00
Philipp Holzer c9e510d4fd
Use getmypid() as dependency (improve testing) 2020-09-19 20:28:01 +02:00
Michael c36bfcf17d Changed loglevels in the worker 2020-09-17 17:57:41 +00:00
Philipp Holzer cdb61be06f
Rewrite Process Model/Core 2020-09-15 18:16:44 +02:00
Michael d8d2cdc6ef Only c heck every 5 seconds for the system health 2020-08-29 13:01:58 +00:00
Michael 8148d9dc9d Unclaim on end / don't refetch 2020-08-29 11:26:40 +00:00
Michael 069786cd7f Simplified the code 2020-08-29 10:44:38 +00:00
Michael f9152ce140 Worker: Fetch jobs for multiple workers 2020-08-29 09:03:50 +00:00
Michael 98dd15ec9a Adding a cooldown phase for the daemon 2020-08-19 18:21:40 +00:00
Michael Vogel b5cca1ab93 Some small performance tweaks (indexes) 2020-08-18 12:50:18 +02:00
Michael f09d9bc9cc Remove url caching, locking cleanup 2020-08-06 18:53:45 +00:00
nupplaPhil 657d08f09f Rename "fetchUrl" and "fetchUrlFull" to "fetch" and "fetchFull" 2020-07-21 03:15:53 -04:00
nupplaPhil 1aa07f87a4 Make "HTTPRequest::fetchUrl" dynamic 2020-07-21 03:04:58 -04:00
nupplaPhil 5344efef71 Move post/curl/fetchUrl/fetchUrlFull to own class "Network\HTTPRequest" 2020-07-21 02:56:10 -04:00
Michael e374e5752a Changed deprecated log calls 2020-06-01 13:51:58 +00:00
Michael 9ccdbd9349 Added forgotten DBA::close 2020-04-28 05:55:17 +00:00
Michael 1c980c5b29 The workerqueue is now using a view as well 2020-04-24 18:50:36 +00:00
nupplaPhil 23c64b9a11
Add license info at Friendica classes 2020-02-09 15:45:36 +01:00
Philipp Holzer 3411ced833
Move Config::set() to DI::config()->set() 2020-01-19 21:21:53 +01:00
Philipp Holzer 6c36fd9e01
Move Config::get() to DI::config()->get() 2020-01-19 21:21:13 +01:00
Michael cdbc94a9e1 Some more added lines 2020-01-19 09:51:37 +00:00
Michael 0a4119adaf @brief is removed completely 2020-01-19 06:05:23 +00:00
Philipp Holzer 31457b8566
Replace Lock::release() with DI::lock()->release() and remove Core\Lock 2020-01-07 00:24:10 +01:00
Philipp Holzer 634e657d23
Replace Lock::acquire() with DI::lock()->acquire() 2020-01-07 00:20:31 +01:00
Philipp Holzer f0eea6f875
Remove get_app() in favor of DI::app() 2020-01-04 23:42:01 +01:00
Philipp Holzer 3f34229752
Move redundant System::baseUrl() to DI::baseUrl() calls 2019-12-30 23:00:08 +01:00
Philipp Holzer 5609e94b05
Refactor deprecated App - process methods to DI::process()->*() 2019-12-29 20:17:45 +01:00
Philipp Holzer 9cec293ccc
Refactor dynamic App::getMode() to static DI::mode() 2019-12-29 20:17:42 +01:00
Philipp Holzer 181529f3df
Refactor dynamic App::getProfiler() to static DI::profiler() 2019-12-29 20:17:42 +01:00
Philipp Holzer e2b2778e0a
Refactor dynamic App::getLogger() to static DI::logger() 2019-12-29 20:17:41 +01:00
Philipp Holzer fceb4f3823
Refactor dynamic App::getConfig() to static DI::config() 2019-12-29 20:17:40 +01:00
Philipp Holzer 388b963714
Replace BaseObject class with DI::* calls 2019-12-29 20:17:38 +01:00
Philipp Holzer 1de3f186d7
Introduce new DI container
- Adding Friendica\DI class for getting dynamic classes
- Replacing BaseObject::getApp() with this class
2019-12-29 20:16:55 +01:00
Michael 6af4c90dff Fix delivery counter / archive relay contacts 2019-09-02 03:25:05 +00:00
Michael Vogel cf170c9c02 Fixed count, added to-do 2019-08-28 06:44:37 +02:00
Michael Vogel 9b7432781b Don't transmit content to already archived contacts 2019-08-27 21:01:11 +02:00
Michael Vogel a892156052 Output better comparable log entries for the worker 2019-08-23 07:23:32 +02:00
Michael 5a1a5a54dc Delivery count now counts the failed delivery attempts as well 2019-08-20 07:39:13 +00:00
Philipp Holzer 2c73377b39
Create Core\Process as a base for followup work 2019-08-17 09:09:13 +02:00
Philipp Holzer 90b438e082
Move mode settings to App\Mode
- Move isAjax() to App\Mode
- Move isTablet() to App\Mode
- Move isMobile() to App\Mode
- Refactor last usage of App->isBackend()
2019-08-17 09:09:13 +02:00
Michael Vogel afac4b7698 Improved calculation of deferred tasks 2019-08-13 06:43:08 +02:00
Michael Vogel e07a17daf6 Added config value 2019-08-11 23:07:06 +02:00
Michael Vogel 5c72aeb8d7 Worker: The retrial value can now skip retrial levels 2019-08-11 10:28:52 +02:00
Michael Vogel 35a487ae30 Don't fork worker on frontend by default 2019-08-08 22:42:12 +02:00
Philipp Holzer 6c2cf494b5
Remove DependencyFactory
- Include all necessary classes in `dependencies.config.php`
- Add DI-reference to BaseObject (acts as a global registry)
- Refactor all static "init()" methods to use the global registry

- Refactor Logging for Worker-Logger a little bit
2019-07-27 23:54:12 +02:00
Hypolite Petovan d7d44e1af7
Merge pull request #7245 from annando/unify-constants
Fix delivery counter for poking / unify delivery commands
2019-06-10 11:59:40 -04:00
Michael 41dc243186 Fix delivery counter for poking / unify delivery commands 2019-06-10 14:19:24 +00:00
Philipp Holzer cc7444d84d
Move internal recursion-counter to the end of all cur/fetchUrl parameters 2019-06-10 14:34:54 +02:00
Michael a09c5b692c Command based pre fetching of worker tasks 2019-03-23 06:08:18 +00:00
Michael ea71a4e83a Refetch new jobs only once per execution loop 2019-03-08 20:39:58 +00:00
Tobias Diekershoff 5df246e9af
Merge pull request #6825 from annando/empty-spawn
Worker: Don't spawn without jobs
2019-03-08 07:26:22 +01:00
Michael d87abe9563 Worker: Don't spawn without jobs 2019-03-08 05:53:36 +00:00
Michael f2560c42d1 Reduce the default maximum load for the worker to 20 2019-03-02 18:41:12 +00:00
Michael c3b12b63c8 Added some description, changed logger call 2019-02-27 09:49:26 +00:00
Michael 505a34d40e Log the time as decimal 2019-02-27 09:12:40 +00:00
Michael 78960d4bde Removed unneeded spaces 2019-02-27 09:11:37 +00:00
Michael 5e440aa035 The cron interval is minutes - so we have to convert it into seconds 2019-02-27 08:55:25 +00:00
Michael 0ee1ea5f29 The log text is now shorter 2019-02-27 08:41:45 +00:00
Michael 11e39da6cc And moving the block back to the old place 2019-02-27 07:08:44 +00:00
Michael e1cc7262de Respawing when quitting 2019-02-27 07:04:21 +00:00
Michael 528636c9f4 Using constants is nicer 2019-02-27 06:55:04 +00:00
Michael fb371e1048 Merge remote-tracking branch 'upstream/2019.03-RC' into worker2 2019-02-27 06:41:14 +00:00
Michael 40573120b9 Enhanced logging, stopping worker after cron lifetime 2019-02-27 06:36:19 +00:00
Hypolite Petovan 05d8bf6b54 Fix wrong use of array_shift in Core\Worker 2019-02-25 07:11:35 -05:00
Michael 7703875b55 Fixes "Undefined property: Friendica\App::$queue" 2019-02-23 16:08:02 +00:00