Commit Graph

70 Commits

Author SHA1 Message Date
Molkobain
c767ebe989 📝 Copyright year bump 2023-03-17 18:28:47 +01:00
Thomas Casteleyn
fc97491708 N°6105 - Cleanup unnecessary use of dirname(__FILE__) (#453) 2023-03-14 18:51:01 +01:00
Pierre Goiffon
f4a027b474 Merge remote-tracking branch 'origin/support/2.7' into support/3.0
# Conflicts:
#	composer.json
#	core/cmdbchangeop.class.inc.php
#	core/cmdbobject.class.inc.php
#	css/light-grey.scss
#	setup/setuputils.class.inc.php
#	test/ItopTestCase.php
#	test/core/ConfigTest.php
#	test/core/LogAPITest.php
#	test/core/UserRightsTest.php
#	test/core/dictApcuTest.php
#	test/core/dictTest.php
#	test/core/iTopConfigParserTest.php
#	test/core/ormLinkSetTest.php
#	test/phpunit.xml.dist
#	test/postbuild_integration.xml.dist
#	test/setup/SetupUtilsTest.php
#	test/status/StatusIncTest.php
#	webservices/cron.php
2022-04-22 15:26:18 +02:00
Pierre Goiffon
11e811cc4b N°3717 Improve iTop object history API (#192)
This fixes a major flaw in the history API that was causing "phantom" CMDBChange records (without any CMDBChangeOp attached). That was happening especially in iProcess impl.
For example this lead to the creation of the combodo-cmdbchange-cleaner module in the Mail To Ticket extension.

The modifications in detail : 
- We can now pass a non persisted CMDBChange instance to \CMDBObject::SetCurrentChange
- No persistence done in \CMDBObject::CreateChange anymore
- Persistence of the attached CMDChange will be done if necessary in CMDBChangeOp::OnInsert
- New CMDBObject::SetCurrentChangeFromParams helper method to ease resetting the current change
2022-04-19 17:13:18 +02:00
Stephen Abello
93c6cfffda N°4931 Fix background tasks max duration being set to 3 times its periodicity 2022-03-14 09:35:46 +01:00
Molkobain
8dd96ea636 Copyright year bump 2021-03-15 09:29:45 +01:00
Pierre Goiffon
745e4aa424 Merge remote-tracking branch 'origin/develop' into feature/backoffice-full-moon-design
# Conflicts:
#	webservices/import.php
2020-09-18 10:48:34 +02:00
Pierre Goiffon
4badb90344 N°2214 Cron : remove :void to keep compatibility with PHP < 7.1
see https://www.php.net/manual/fr/migration71.new-features.php#migration71.new-features.void-functions
2020-09-14 11:02:18 +02:00
Eric
63f8ec594c N°2847 - Refactor Web Pages classes - Add UIBlockManager to the WebPage 2020-09-09 18:10:06 +02:00
odain
3c299654e3 N°3265 - Log stacktrace when cron exception raised with debug enabled 2020-09-07 16:57:27 +02:00
Eric
5df7c8bb07 Add Async tasks info 2020-08-26 16:12:22 +02:00
Eric
bf142e5e07 Add Async tasks info 2020-08-26 13:11:04 +02:00
Eric
761c2a46a3 N°3234 - Cron rework
* some timezone refactors occurred
2020-08-25 11:20:17 +02:00
acognet
4618f12d8a N°3234 - Notify on expiration not sending notifications 2020-08-21 18:50:27 +02:00
odain
d12e2e592a N°3265 - Log stacktrace when cron exception raised with debug enabled 2020-08-21 10:25:05 +02:00
Pierre Goiffon
71848cb56b Merge branch 'support/2.7' into develop
# Conflicts:
#	.jenkins/bin/tests/phpunit.sh
#	Jenkinsfile
#	core/config.class.inc.php
#	core/dbobjectsearch.class.php
#	core/ormlinkset.class.inc.php
#	datamodels/2.x/combodo-db-tools/dbtools.php
#	dictionaries/nl.dictionary.itop.ui.php
2020-08-17 09:36:43 +02:00
Pierre Goiffon
07bd6b8539 N°3219 cron : reset CMDBChange for each process 2020-08-04 09:44:20 +02:00
Pierre Goiffon
b7136c0b7a N°2214 Add PHP check in CLI scripts
It is quite common that the PHP interpreter that is launched in CLI is different that the one used by the webserver. So iTop code launched by CLI could run in a context that doesn't meet iTop requirements !

This adds in the following scripts the same control that is done on the setup wizard first step :
* cron.php
* backup, check-backup
* export, exportv2
* bulk import
* synchro-exec, synchro-import

If the check throws at least one error then the script is stopped with an appropriate message, and a log is made (IssueLog, Error level, CLI channel)

(cherry picked from commit c768e18e2b : no risk taken for 2.7.1, so cherry picked for 2.8.0)
2020-06-15 15:20:17 +02:00
Pierre Goiffon
8912618732 Revert "N°2214 Add PHP check in CLI scripts"
This reverts commit c768e18e2b.
No risk taken for the 2.7.1 : this will be included but for 2.8 !
2020-06-15 15:18:26 +02:00
Pierre Goiffon
c768e18e2b N°2214 Add PHP check in CLI scripts
It is quite common that the PHP interpreter that is launched in CLI is different that the one used by the webserver. So iTop code launched by CLI could run in a context that doesn't meet iTop requirements !

This adds in the following scripts the same control that is done on the setup wizard first step :
* cron.php
* backup, check-backup
* export, exportv2
* bulk import
* synchro-exec, synchro-import

If the check throws at least one error then the script is stopped with an appropriate message, and a log is made (IssueLog, Error level, CLI channel)
2020-06-12 16:46:37 +02:00
Pierre Goiffon
5b496f4d15 N°2866 Change "cron" case in labels as it is not an acronym
Thanks @Hipska for the feedback done in Combodo/iTop#124 !
2020-03-26 11:15:47 +01:00
Pierre Goiffon
07b8830436 N°2814 Fix cannot authenticate in some HTTP calls
basic mode was forced in 0dd1f26b
scripts concerned :
* synchro/synchro_import.php
* webservices/cron.php
* webservices/import.php
2020-03-02 11:56:00 +01:00
Eric
900e8ac6d7 N°985 - Add applicable contexts on Trigger 2020-01-20 15:50:08 +01:00
Eric
5be800cfce N°2249 - Supportability - Updater module (split ajax calls) 2020-01-15 15:48:54 +01:00
Pierre Goiffon
7235c63445 Abstract implementation for iScheduledProcess (#89)
* 📝 little PHPDoc in BackupExec
* ♻️ Create a extendable implementation of iScheduledProcess
* create AbstractWeeklyScheduledProcess
* move schedule methods to the new abstract class
* create ProcessInvalidConfigException
* in cron.php skip abstract class
2019-11-15 14:41:00 +01:00
bruno DA SILVA
08c1f4f072 autoload rework
- bootstrap.inc.php is now included by approot.inc.php
 - remove all unescessaries includes of bootstrap.inc.php
 - in bootstrap.inc.php autoload can be bypassed using a feature flag because "why not"
2019-11-08 16:51:57 +01:00
Eric
9b14cd7633 N°2240 - Supportability - Maintenance mode 2019-11-07 15:23:42 +01:00
Eric
2b2488f376 N°2240 - Supportability - Maintenance mode 2019-11-07 15:21:48 +01:00
Eric
5e7ae930c5 N°2240 - Supportability - Maintenance mode 2019-11-07 12:36:35 +01:00
Eric
9054dcb9ff N°2517 - Supportability : system report (user name) 2019-11-04 12:06:49 +01:00
Eric
68895551b2 N°2517 - Supportability - system report (Added cron user) 2019-10-09 12:11:17 +02:00
Eric
0dd1f26b39 N°2311 - Authentication extensibility in iTop 2019-10-08 15:23:24 +02:00
Eric
afe760a8bc N°2240 - Supportability - Maintenance mode 2019-10-01 13:53:34 +02:00
Eric
044623309c N°2240 - Supportability - Maintenance mode 2019-09-27 17:13:25 +02:00
Molkobain
947e26d864 Internal: Change how the bootstrap.inc.php file is included in endpoints (This completes commit ec095896) 2019-08-13 17:38:51 +02:00
Molkobain
ec09589646 N°2439 Add real autoloader for framework files (not modules) 2019-08-13 13:46:19 +02:00
Eric
a6737afb2f N°2240 - Supportability - Maintenance mode 2019-07-11 10:22:39 +02:00
Thomas Casteleyn
5c9d98d12c Fix cron crash when MySQL connection lost (#80) 2019-04-30 11:02:02 +02:00
Denis Flaven
65409373eb Enhancement: automatic re-ordering of the background tasks at each execution of cron.php so that one single task cannot use all the CPU time.
SVN:trunk[5734]
2018-04-24 12:12:36 +00:00
Pierre Goiffon
08c5d0e4c1 N°1342 cron : fix iScheduledProcess implementations that were rescheduled on every cron start and so never processed :( (was introduced in r5371)
SVN:trunk[5374]
2018-02-27 16:38:38 +00:00
Pierre Goiffon
79381d7fd2 N°1342 cron : previous commit was to handle BackgroundTask pointing to non existing class (can happen after an extension removal)
add comment reflecting the class_exists() test purpose

SVN:trunk[5372]
2018-02-27 15:49:03 +00:00
Pierre Goiffon
d8c141b1c9 N°1342 cron task validity checks :
* checks are now made one by one
* new class_exists() test

SVN:trunk[5371]
2018-02-27 15:20:55 +00:00
Guillaume Lajarige
333411535e N°1132 Add ContextTag on CRON background tasks (eg. "CRON:Task:<CLASS_NAME_OF_THE_CURRENT_TASK>").
Introduced for the "Mail to ticket automation" extension, so we know when a Ticket is created/updated from an email.

SVN:trunk[5181]
2017-12-29 09:55:36 +00:00
Pierre Goiffon
28efea7ac1 N°1195 exception handling in cron.php
* cron.php : use exit(n°) instead of exit n°, and extract codes to constants
* CMDBSource : new MySQLHasGoneAwayException
* exits cron.php on MySQLHasGoneAwayException
* fix backgroundprocess PHPDoc
* new ProcessException and ProcessFatalException
* new cron.php catch blocks

SVN:trunk[5148]
2017-12-04 15:07:15 +00:00
Pierre Goiffon
3cd28d1559 Some PHPDoc and small reformat
SVN:trunk[5139]
2017-11-23 17:42:24 +00:00
Romain Quetiez
80121b89c3 Obsolescence: background task setting (or resetting) the obsolescence date for obsolete data. The periodicity can be tuned by the mean of obsolescence.date_update_interval, defaulting to 10 minutes. Also renamed show_obsolete_data into obsolescence.show_obsolete_data for consistency.
SVN:trunk[4745]
2017-05-19 09:20:13 +00:00
Denis Flaven
18de167d5e Internal: context tags to (programmatically) identify the context of the execution.
SVN:trunk[4259]
2016-06-23 14:57:37 +00:00
Romain Quetiez
95ca14b05c #1165 backup with errors fills up tmp-directories with lots of backup-files.
SVN:trunk[3868]
2016-01-21 14:55:31 +00:00
Denis Flaven
1aa489890c Make sure that the SQL mutexes are specific to the current iTop instance, but still preserving the capability for the setup to detect an already running cron job with or without a valid config file.
SVN:trunk[3591]
2015-06-12 17:00:41 +00:00
Denis Flaven
54769aa2d1 Oops, rollback of the previous (unexpected) commit...
SVN:trunk[2954]
2013-10-24 09:28:25 +00:00